anthonyjgrove / react-google-login

A React Google Login Component
https://anthonyjgrove.github.io/react-google-login
MIT License
1.85k stars 425 forks source link

SignIn is deprecated for new client application #526

Open jaipatel248 opened 2 years ago

jaipatel248 commented 2 years ago

`{

"error": "idpiframe_initialization_failed", "details": "You have created a new client application that uses libraries for user authentication or authorization that will soon be deprecated. New clients must use the new libraries instead; existing clients must also migrate before these libraries are deprecated. See the Migration Guide for more information." }`

siyahulhaq-ceymox commented 2 years ago

Same issue happening for me also

jaipatel248 commented 2 years ago

You can use @react-oauth/google package. It's working for me

tuanlaht commented 2 years ago

You can use @react-oauth/google package. It's working for me

How did you logout ?, i use @react-oauth/google but it already login by default google account of brower

jaipatel248 commented 2 years ago

You can use @react-oauth/google package. It's working for me

How did you logout ?, i use @react-oauth/google but it already login by default google account of brower

I guess they don't have this feature

MomenSherif commented 2 years ago

Hello @bileanh2000 @jaipatel248 Google is no longer manage user session, so If you can log them out with your own logic to update your state any time you want.

nhat-em-wick commented 2 years ago

i use @react-oauth/google but not response tokenId, how to get tokenId?

MomenSherif commented 2 years ago

@nhat-em-wick If you want to get id_token specifically you will need to use Authorization code flow within useGoogleLogin and will require backend

https://react-oauth.vercel.app/ You can follow Authorization -> Authorization code flow

jaipatel248 commented 2 years ago

i use @react-oauth/google but not response tokenId, how to get tokenId?

you need to use Authorization code flow it will give you key named code you can use to get access_token and refresh_token from the backend

lightwave commented 2 years ago

i use @react-oauth/google but not response tokenId, how to get tokenId?

you need to use Authorization code flow it will give you key named code you can use to get access_token and refresh_token from the backend

id_token is not the same as access_token