MomenSherif / react-oauth

Google OAuth2 using the new Google Identity Services SDK for React 🚀
https://www.npmjs.com/package/@react-oauth/google
MIT License
1.13k stars 141 forks source link

Implicit flow with useGoogleLogin hook #307

Open Lenur29 opened 1 year ago

Lenur29 commented 1 year ago

Hi @MomenSherif. First of all thank you very much for this amazing library. I have a question. Can I use an implicit flow using useGoogleLogin hook? I get the tokenResponse and after that send it to backend. And then I get the user info from the backend. Is it possible to implement like this? I tried it and it works only when I launch my application on localhost. When I deploy it, it does not work. onSuccess function is not called and there are no any errors in the console. I click on a button Sign up with google like I do on localhost, then it shows me google authorization page, I choose my account and click. After that nothing happens. Can it be because of using an implicit flow in a way I described?