Unable to get facebook to authenticate... #3733
Replies: 6 comments 6 replies
-
Make sure you are trying to login using your developer account , if you use any other account to login in localhost you will get this error . BUT for me it started 2 days ago even with developer account logging on localhost i get expected 200 OK, got: 400 Bad Request, name: 'OAuthCallbackError' |
Beta Was this translation helpful? Give feedback.
-
Fore sure, I'm using the test account generated in the settings. |
Beta Was this translation helpful? Give feedback.
-
Any news on this? I am currently dealing with same issue? Any idea what this could be related to? edit: I just figured out that I had created a "Business" type app instead of a "Consumer" one. When using next-auth with a Consumer type app, it works for me. However, I do want to use a Business type app, as I want to use Instagrams GraphAPI. Should I be able to use next-auth for this? Or does it only work with Consumer type apps? |
Beta Was this translation helpful? Give feedback.
-
I'm dealing with the same issue. Is it possible to use the NextAuth to login to Facebook and from there use the marketing API from Facebook? To use the marketing API I forcefully need to create an app of the type Business by the way. |
Beta Was this translation helpful? Give feedback.
-
Still no luck? |
Beta Was this translation helpful? Give feedback.
-
https://yourdomain.com/api/auth/callback/facebook <--- change yourdomain.com to your production domain.. and put that into the allowed URI on facebook settings.... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Question 💬
I am having some trouble getting facebook to authenticate. I am using standard nextjs-auth. I get the following error:
I am using localhost:3000 and my setup for facebook login is as follows:

my understanding is facebook login does not require redirect url's for localhost? I tried anyway but the field doesn't accept localhost unless you add httpS://localhost
Node v16.13.2
npx v8.1.2
yarn 1.22.17
I created this project with yarn create and the app is standard.
Please let me know if you need any more details. I have tried various difference combinations of trying to add localhost, facebook, the redirect url into various domains in the facebook app, but nothing I have tried seems to work.
I am using firebase as a backend and I went as far as enabling facebook authentication on their to give me a redirect url (as localhost doesn't work), but that also didn't work either.
I imagine it's something very silly I am missing.
How to reproduce ☕️
Create a nextjs app with yarn, add nextjs-auth, create a facebook app.
Contributing 🙌🏽
No, I am afraid I cannot help regarding this.
Beta Was this translation helpful? Give feedback.
All reactions