dissorial / doc-chatbot

Document chatbot — multiple files, topics, chat windows and chat history. Powered by GPT.
813 stars 137 forks source link

Error 400: redirect_uri_mismatch #10

Closed jasmeetchadha closed 1 year ago

jasmeetchadha commented 1 year ago

Perhaps this is a lame question - How do I fix this?

dissorial commented 1 year ago

I'm afraid you'll need to provide me with more details about the error you're getting. Can you paste the full error message you get in the terminal/browser dev tools?

audvin commented 1 year ago
Error 400: redirect_uri_mismatch

You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy.

If you're the app developer, register the redirect URI in the Google Cloud Console.
Request details: redirect_uri=http://localhost:3000/api/auth/callback/google

I'm seeing the same at Sign in with Google: https://developers.google.com/identity/protocols/oauth2/web-server#authorization-errors-redirect-uri-mismatch

dissorial commented 1 year ago

Okay, verify the following:

In google developer console

In .env file

audvin commented 1 year ago

I had all set accordingly, but I reset and reentered all. That solved it for me, thank you.

dissorial commented 1 year ago

I'll probably publish a branch with all features except for google auth at some point in the near future to make the set-up easier for those who don't intend on deploying the app

jasmeetchadha commented 1 year ago

I was missing this:

in the credentials section, 'Authorized redirect URIs' should be set to http://localhost:3000/api/auth/callback/google

Now it works. Perhaps, worth adding it in the Auth0 section!

dissorial commented 1 year ago

Will update shortly, thanks!