[next-auth][error][OAUTH_CALLBACK_ERROR] with FacebookProvider #629
Labels
bug
A bug that needs to be resolved
closed-by-bot
Closed by automation
needs-reproduction
Action needed: A valid reproduction of the issue needs to be added
Environment
Reproduction
No response
Describe the bug
While using FacebookProvider from "next-auth/providers/facebook", the error comes with signIn('facebook'):
[next-auth][error][OAUTH_CALLBACK_ERROR]
https://next-auth.js.org/errors#oauth_callback_error expected 200 OK, got: 400 Bad Request {
error: OPError: expected 200 OK, got: 400 Bad Request
at processResponse (/home/cloudeep/taicca_database/client_nuxt/.output/server/node_modules/openid-client/lib/helpers/process_response.js:41:11)
at Client.userinfo (/home/cloudeep/taicca_database/client_nuxt/.output/server/node_modules/openid-client/lib/client.js:1264:18)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Object.request (/home/cloudeep/taicca_database/client_nuxt/.output/server/node_modules/next-auth/providers/facebook.js:28:16)
at oAuthCallback (/home/cloudeep/taicca_database/client_nuxt/.output/server/node_modules/next-auth/core/lib/oauth/callback.js:121:17)
at Object.callback (/home/cloudeep/taicca_database/client_nuxt/.output/server/node_modules/next-auth/core/routes/callback.js:52:11)
at AuthHandler (/home/cloudeep/taicca_database/client_nuxt/.output/server/node_modules/next-auth/core/index.js:201:28)
at file:///home/cloudeep/taicca_database/client_nuxt/.output/server/chunks/nitro/node-server.mjs:10375:24
at Object.handler (file:///home/cloudeep/taicca_database/client_nuxt/.output/server/chunks/nitro/node-server.mjs:2393:19)
at Server.toNodeHandle (file:///home/cloudeep/taicca_database/client_nuxt/.output/server/chunks/nitro/node-server.mjs:2582:7) {
name: 'OAuthCallbackError',
code: undefined
},
providerId: 'facebook',
message: 'expected 200 OK, got: 400 Bad Request'
}
I have also check next-auth github and there are some discussion in nextauthjs/next-auth#3711. They said it is because facebook deprecated v11 graph api, and this error only shows in local environment. However, it always ocurrs in my production version.
Is there othet way to adopt FacebookProvider with @sidebase/nuxt-auth? Many thanks for your help in advence.
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: