Facebook Provider Callback Error #4146
Replies: 6 comments 8 replies
-
Facing same issue. Facebook login was working before (was using access_token), suddenly getting this message - Now tried adding |
Beta Was this translation helpful? Give feedback.
-
I have the same problem, even though I found the culprit, I can't fix it. The problem for me is, the application in question implements Facebook login on a website and iOS/Android apps. When the user logs in the iOS app, the authentication happens with OpenID, and this "sets" the user information to OpenID, and then, when I try to log in the website, it attemps to authenticate with Auth2, and the error you mentioned happens, since the |
Beta Was this translation helpful? Give feedback.
-
Same problem here! It was working and it stopped working. |
Beta Was this translation helpful? Give feedback.
-
This seems to be an issue across providers. Got the same issue with Salesforce. |
Beta Was this translation helpful? Give feedback.
-
@codal-Jamie - looks like this can be solved by removing the |
Beta Was this translation helpful? Give feedback.
-
Has someone found a solution to this? |
Beta Was this translation helpful? Give feedback.
-
Environment
System:
OS: macOS 12.2.1
CPU: (10) arm64 Apple M1 Pro
Memory: 1.97 GB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.14.0 - ~/.nvm/versions/node/v16.14.0/bin/node
Yarn: 1.22.17 - /opt/homebrew/bin/yarn
npm: 8.3.1 - ~/.nvm/versions/node/v16.14.0/bin/npm
Browsers:
Chrome: 99.0.4844.51
Safari: 15.3
npmPackages:
next: ^12.1.0 => 12.1.0
next-auth: ^4.0.1 => 4.2.1
react: ^17.0.1 => 17.0.2
Reproduction URL
N/A - Client Website
Describe the issue
Hi,
I'm running into some issues with setting up the Facebook provider. I'm using the same code as the example in the docs besides the environment variables.
FacebookProvider({ clientId: process.env.FACEBOOK_CLIENT_ID, clientSecret: process.env.FACEBOOK_CLIENT_SECRET, }),
I'm receiving this error in the console:
id_token detected in the response, you must use client.callback() instead of client.oauthCallback()
Adding idToken as a param doesn't seem to solve the issue either.
The issue appears when clicking the Facebook button on the website before being redirected to Facebook.
How to reproduce
Set up next-auth using Facebook Example https://next-auth.js.org/providers/facebook and adding
onClick={() => signIn('facebook', { callbackUrl:
/, }) }.
to a button.Expected behavior
Facebook OAuth flow is completed and the user is able to log in to the website.
Beta Was this translation helpful? Give feedback.
All reactions