cuongdevjs / reactjs-social-login

Group Hook ReactJS components for login social network
https://react-social-login.netlify.app
MIT License
168 stars 75 forks source link

Google doesn't works in incognito mode in chrome. #142

Open jobrach-rbi opened 10 months ago

jobrach-rbi commented 10 months ago

Describe the bug Google sign-in is not working incognito.

  <LoginSocialGoogle
    client_id={googleServiceWebClientIds}
    scope={
      'https://www.googleapis.com/auth/userinfo.profile, https://www.googleapis.com/auth/userinfo.email'
    }
    typeResponse="idToken" 
    ....

/>

To Reproduce Steps to reproduce the behavior:

  1. Go to incognito mode in Chrome for OSX
  2. Click on google auth button.

Expected behavior Google prompt should be displayed or some message error should be fired from google to let the user know what is happening.

Desktop (please complete the following information):

Additional context If I logged in to my google account using the incognito browser, then I was able to see the google account popup. but this is not what we expect.

cuongdevjs commented 10 months ago

Have you tried to log in using Google on my demo site?

jobrach-rbi commented 10 months ago

@cuongdevjs yes but it's not working too in incognito. Others providers works, no Google

https://github.com/cuongdevjs/reactjs-social-login/assets/102164699/575e15f7-b046-46a0-9157-1858e0673c8b

cuongdevjs commented 10 months ago

please try to remove access_type=offline props

jobrach-rbi commented 10 months ago

@cuongdevjs thank for answer 🥇

I am not using that prop and as I can see by default is online . Could be it related to some recent security changes from Google ?

jobrach-rbi commented 10 months ago

Sorry, any change to check it right ?

thainv92 commented 10 months ago

I have same issue with google login in Incognito mode chrome

image
Tilesto commented 9 months ago

The same problem, even on demo-site On this line https://github.com/cuongdevjs/reactjs-social-login/blob/24b29fe5cda1316eb176ad14711cc3dc84edad5d/src/LoginSocialGoogle/index.tsx#L133

Fuchsoria commented 9 months ago

After clicking on close button on google popup got same permanent issue image

Fuchsoria commented 9 months ago

On a case when you closed google login window and got permanent issue with credentials you can do following steps to hotfix it for future: First install any cookie management, for example https://www.npmjs.com/package/js-cookie Then set onLoginStart={onStartGoogle} for google login And here is a code which needs to start before every google login: image

So, the problem is coming with g_state cookie, which kills google login button totally