Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 400: Invalid Request when using Google OAuth2 on Vercel builds (works in localhost) #622

Closed
3 of 5 tasks
SushritPasupuleti opened this issue Aug 30, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@SushritPasupuleti
Copy link

SushritPasupuleti commented Aug 30, 2020

Describe the bug
I built a basic project using the example repo. Everything is configured (environment variables, authorized domains etc) and even included the environment variables on vercel too. But for some reason, even after it works perfectly on localhost the login fails when on vercel.

Steps to reproduce

  • You can head to my live site here: link to site

  • Press sign in in the top nav bar.

  • Use google sign in

  • You're greeted by the error message.

Expected behavior
The signin should be succesful and you should be redirected to the home page. And the nav bar should show your gmail details.

Screenshots or error logs
Capture1

Additional context
Add any other context about the problem here.

  • Found the documentation helpful
  • Found documentation but was incomplete
  • Could not find relevant documentation
  • Found the example project helpful
  • Did not find the example project helpful
@SushritPasupuleti SushritPasupuleti added the bug Something isn't working label Aug 30, 2020
@SushritPasupuleti
Copy link
Author

Updating to the latest version fixed this issue, without changing any other configs.

@tamlth0595
Copy link

@SushritPasupuleti
Could you guide me how to make google signin on the vercel?

@tamlth0595
Copy link

@SushritPasupuleti
If you have time, please help me.
I have urgent task.

@SushritPasupuleti
Copy link
Author

@tamlth0595 sure, let me know what it is ?

@tamlth0595
Copy link

ok, I will send you the url.
https://funding-index.vercel.app/

@tamlth0595
Copy link

image
when I click the "sign in" button, why the url is redirected to the different url?
I am not why this happens.

@tamlth0595
Copy link

How do you set the environment variables on vercel?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants