Next.js Discord

Discord Forum

Error 400 redirect uri mistmatch error when logging in with oauth google provider

Unanswered
Pacific sand lance posted this in #help-forum
Open in Discord
Pacific sand lanceOP
hi, so I deployed my app to vercel, and entered all my enviornment variables too, but whenever i try to sign in with google provider, it says:

Access blocked: This app’s request is invalid
You can’t sign in because this app sent an invalid request. You can try again later, or contact the developer about this issue. Learn more about this error If you are a developer of this app, see error details.Error 400: redirect_uri_mismatch


I think it is because of my NEXTAUTH_URL, but I am pretty sure its configured correctly. I set it to https://odin-book-sand.vercel.app . And then in google console online, i set the uri to be https://odin-book-sand.vercel.app/api/auth/callback/google

what am i doing wrong? I tried this too and no luck: https://www.youtube.com/watch?v=xGAUo-x1i_o

repo incase you need to look: https://github.com/ForkEyeee/odin-book

3 Replies

Pacific sand lanceOP
bump
Pacific sand lanceOP
anyone wondering how to fix this: downgrasde sharp
npm install --os=linux --cpu=x64 sharp@0.32.6