Replies: 2 comments 3 replies
-
|
First thing I noticed is that you're passing the string |
Beta Was this translation helpful? Give feedback.
-
|
The problem emerged from here export type OAuthProviderOptions = Pick<OAuthConfig, 'client_id' | 'client_secret'>;` then import this type where you create the provider |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to migrate my app to next-auth v5 (while on early stage). So I used my old custom OAuth provider (particularly, lichess oauth) , but it doesn't work. I digged into auth/core/providers to make mine similar, but it hasn't helped either. And there is not so much information about using custom providers in v5.. So, if someone here could suggest how I can try fix it, i'd highly appreciate!
My lichess-provider that worked well in next-auth-v4:
and it just received clientId and clientSecret later:
now I tried loooots of ways. but im stuck with same error:
error { error: 'invalid_request', error_description: 'client_id required (choose any)' } [auth][error] CallbackRouteError: Read more at https://errors.authjs.dev#callbackrouteerror [auth][cause]: Error: TODO: Handle OAuth 2.0 response body error at handleOAuth (webpack-internal:///(rsc)/./node_modules/next-auth/node_modules/@auth/core/lib/actions/callback/oauth/callback.js:88:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Module.callback (webpack-internal:///(rsc)/./node_modules/next-auth/node_modules/@auth/core/lib/actions/callback/index.js:33:41) at async AuthInternal (webpack-internal:///(rsc)/./node_modules/next-auth/node_modules/@auth/core/lib/index.js:42:24) at async Auth (webpack-internal:///(rsc)/./node_modules/next-auth/node_modules/@auth/core/index.js:123:29) at async /Users/matvey/Documents/mkt/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:63251 [auth][details]: { "provider": "lichess" }and this is where i get redirection to error:
If any questions, I'd be happy to answer. Any thoughts — highly welcomed!
Beta Was this translation helpful? Give feedback.
All reactions