You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import NextAuth from 'next-auth';
import { authOptions } from '../../../../config/authOptions';
const handler = NextAuth(authOptions);
export { handler as GET, handler as POST };
No TS build failures after migrating from V4 to v5, I cannot see any docs related to the changing of the route exporting format -> Next auth docs
This code was fully functional with:
The text was updated successfully, but these errors were encountered:
avi312singh
added
bug
Something isn't working
triage
Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
labels
May 7, 2024
Environment
Reproduction URL
https://github.com/avi312NHS/next-auth-issue
Describe the issue
After migrating to next-auth v5 I am getting a build error with my current route.ts configuration
How to reproduce
As per reproduction repo cloned from - https://github.com/nextauthjs/next-auth-example, export auth configuration options to another directory and try to
npm run build
app/api/auth/[...nextauth]/route.ts
config/authOptions.ts
Expected behavior
No TS build failures after migrating from V4 to v5, I cannot see any docs related to the changing of the route exporting format -> Next auth docs
This code was fully functional with:
Other unanswered issues with same error
https://stackoverflow.com/questions/78214384/type-error-route-app-api-auth-nextauth-route-ts-does-not-match-the-requi
https://stackoverflow.com/questions/77637651/authoptions-is-not-a-valid-route-export-field
The text was updated successfully, but these errors were encountered: