Replies: 4 comments 5 replies
-
Facing same problem |
Beta Was this translation helpful? Give feedback.
0 replies
-
any help? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Staying in 0.30 in auth/core works, moving to 0.31 breaks |
Beta Was this translation helpful? Give feedback.
2 replies
-
Hey, try this, in your authConfig, change Btw, anyone knows how to get access_token in api route, in v4 I use import { getToken } from "next-auth/jwt";
const {accessToken}= await getToken({ req, secret: authOptions.secret }); |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using the most recent next.js and next-auth beta versions. My project uses a custom provider, and everything works perfectly with version 4. However, using the identical configuration with v5 breaks, the page does not redirect me to the org sign in page. Can someone help me if there's anything wrong with this custom provider approach? Thanks.
UI Error:
http://localhost:3002/api/auth/error?error=Configuration
Message:
Logs:
[auth][error] CallbackRouteError: Read more at callbackrouteerror
[auth][cause]: Error: TODO: Handle www-authenticate challenges as needed
at handleOAuth (web pack-internal:///(rsc)/./node_modules/@auth/core/lib/actions/callback/oauth/callback.js)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
ENV VARIABLES:
AUTH_URL: 'http://localhost:3002'
AUTH_SECRET: 'SECRET HERE'
Here is the v4 custom provider configuration:
middleware.ts
auth.config.ts
Beta Was this translation helpful? Give feedback.
All reactions