Google login works

I’m having issues logging to google’s account via API and useGoogleLogin() with my vercel deployed application. it does work when running my project locally but the google login process doesn’t seem to be saving my accessToken to session storage or local storage. Does Google Cloud requires anything else more specifically than Authorized JavaScript origins and Authorized redirect URIs for this to work?

currently it navigates me to the google sign in page, it shows the loading animation logging int, but after automatically returning to the calendar page I see the login button again.

what causes this issue is the token not being saved to local storage when in the signing in process…

I have all my environment variables set

Hi, @paulooliveira152012!

Are you seeing a similar issue to another community member?

If not, could you share any helpful logs?

Hey! I actually solved it. I’ve been having a few issues with deployment but as of right now I’ve figured them all out. I believe the issue I was referring to was solved by removing some cors rerouting logic in my vercel.js.

I cleaned it up and just left this:

{
  "rewrites": [
    {
      "source": "/:path*",
      "destination": "/index.html"
    }
  ]
}

and it worked.

2 Likes

Awesome, I’ll share this in the other thread :smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.