angularx-social-login icon indicating copy to clipboard operation
angularx-social-login copied to clipboard

3rd party Cookies (NID) are blocked on Chrome private browser

Open randi2993 opened this issue 4 years ago • 31 comments

{"error":"idpiframe_initialization_failed","details":"Cookies are not enabled in current environment."}

randi2993 avatar Jul 13 '20 01:07 randi2993

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.94. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

issue-label-bot[bot] avatar Jul 13 '20 01:07 issue-label-bot[bot]

The message says cookies are blocked. Have you tried enabling them?

jaibatrik avatar Jul 13 '20 14:07 jaibatrik

Thanks for your reply. Yes, I did. But the error only happens with google provider... and when the browser is in incognito mode. Tested on chrome last version.

randi2993 avatar Jul 13 '20 15:07 randi2993

Not sure, it might be an issue with Google's sign-in library; I did find this - https://developers.google.com/identity/sign-in/web/troubleshooting#chrome_on_ios_in_incognito_mode

jaibatrik avatar Jul 14 '20 11:07 jaibatrik

Looks like other libraries have also faced this, but nobody found a solution apparently. Need to check on if we have the same problem in any of Google's example pages.

jaibatrik avatar Jul 14 '20 11:07 jaibatrik

I have the same issue with both google and facebook login; and in the normal chrome browser (not incognito) (Using Ng 10)

gauriz avatar Jul 23 '20 21:07 gauriz

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 21 '20 22:09 stale[bot]

Keeping this alive for now.

jaibatrik avatar Sep 24 '20 03:09 jaibatrik

For my case, an error sometimes appears in the common tab and incognito tab only for google provider. Cache clearing can't help. Any updates with this idpiframe_initialization_failed?

IgorKurkov avatar Nov 18 '20 10:11 IgorKurkov

Also how the problem in WebView on Android 10, which also seems to block 3rd party cookies.

penfold avatar Dec 10 '20 16:12 penfold

Yes, I'm also Facing same issues. Google login not working in chrome private browser(incognito mode). But when i enable "Allow all cookies" in browser. then it's working fine.

As well i play with some other site like linked-in, quora, glassdoor, etc.. It's working fine with when "Block third-party cookies" in browser. In other words it's working fine if " third-party cookies" is enable or not.

My question is How is working google login in private window when Block third-party cookies in browser in such a site linked-in, quora, glassdoor.

agiratech-jayasurya avatar Dec 13 '20 15:12 agiratech-jayasurya

idpiframe_initialization_failed, because third party cookies are blocked in private window, Any solution for this issue.

tabish-ahmed avatar Dec 24 '20 13:12 tabish-ahmed

Yes, I'm also Facing same issues. Google login not working in chrome private browser(incognito mode). But when i enable "Allow all cookies" in browser. then it's working fine.

As well i play with some other site like linked-in, quora, glassdoor, etc.. It's working fine with when "Block third-party cookies" in browser. In other words it's working fine if " third-party cookies" is enable or not.

My question is How is working google login in private window when Block third-party cookies in browser in such a site linked-in, quora, glassdoor.

I think this issues is in this library and not in google social login sdk

tabish-ahmed avatar Dec 24 '20 13:12 tabish-ahmed

Could anyone facing this issue give me the URL where I can see the problem? Is everyone using https?

jaibatrik avatar Dec 28 '20 07:12 jaibatrik

Check this out - https://github.com/googleworkspace/browser-samples/issues/6#issuecomment-381998260

I think we need to support the redirect method of social login, if we want to bypass this. That seems considerable effort though.

I don't know how many users are facing this - based on that we can take a call whether we want to explore the redirect / server-side flow. That would fix the issue with PWAs as well.

jaibatrik avatar Dec 28 '20 10:12 jaibatrik

Yes, I think, most of our plugin user face this issues. I checkout demo on stackblitz in private window. it's also have same issues. https://stackblitz.com/edit/angularx-social-login

agiratech-jayasurya avatar Dec 28 '20 11:12 agiratech-jayasurya

Based on https://developers.google.com/identity/sign-in/web/troubleshooting#third-party_cookies_and_data_blocked, this is a known issue. At current stage, my suggestion would be to handle the error and ask user to enable third-party cookies if they want to sign-in.

However, I think we need to explore the OAuth flow at some point.

jaibatrik avatar Dec 28 '20 14:12 jaibatrik

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Feb 26 '21 16:02 stale[bot]

Up

IgorKurkov avatar Feb 26 '21 17:02 IgorKurkov

Would love to see it fixed!

avialonn avatar Mar 14 '21 19:03 avialonn

I am still facing the same issue for chrome incognito mode. Any new updates for the above mentioned bug

AdamAnsari avatar Mar 24 '21 07:03 AdamAnsari

I'm facing the same issue. A workaround might be to display a warning if 3rd party cookies are blocked. Is there a way to check this?

EDIT; I found out how to do it: socialAuthService.signIn returns a promise, so I now show a message when rejected.

bttb avatar May 18 '21 09:05 bttb

Any update on this thread, Still we are facing the issue.

krishnanprasad avatar May 29 '21 06:05 krishnanprasad

I'm facing the same issue. A workaround might be to display a warning if 3rd party cookies are blocked. Is there a way to check this?

EDIT; I found out how to do it: socialAuthService.signIn returns a promise, so I now show a message when rejected.

Can you show a code snippet on how you catch the promise when rejected - would be great.

Ultimately would be better to have it just working rather than having users needing to change their block 3rd party cookie settings.

jinxymon avatar Jun 03 '21 13:06 jinxymon

It's just a workaround, but it looks like this:

    this.socialAuthService.signIn(GoogleLoginProvider.PROVIDER_ID)
      .then(x => {
        //console.log('success', x)
      }, err => {
        this.dialogs.openMessageDialog(
          'Google Login Failed',
          'The Google Login failed. Please make sure that 3rd party cookies have not been blocked.');
        console.log('rejected', err);
      });

bttb avatar Jun 03 '21 13:06 bttb

I've encountered this issue on Brave with Shields up and Cross-site cookies blocked. The big problem in my case is that I don't receive anything in the authState subscription and signIn promise. It seems to silently crash somewhere and I am left with no clue as to what's going on.

It's just a workaround, but it looks like this:

    this.socialAuthService.signIn(GoogleLoginProvider.PROVIDER_ID)
      .then(x => {
        //console.log('success', x)
      }, err => {
        this.dialogs.openMessageDialog(
          'Google Login Failed',
          'The Google Login failed. Please make sure that 3rd party cookies have not been blocked.');
        console.log('rejected', err);
      });

Thanks for the example - great help for me.

jinxymon avatar Jun 16 '21 10:06 jinxymon

I've encountered this issue on Brave with Shields up and Cross-site cookies blocked. The big problem in my case is that I don't receive anything in the authState subscription and signIn promise. It seems to silently crash somewhere and I am left with no clue as to what's going on.

Could you try the onError callback that can be passed as part of SocialAuthServiceConfig?

jaibatrik avatar Jun 19 '21 16:06 jaibatrik

@jaibatrik I've tried that too, forgot to mention it. It doesn't work.

Up

ErikPhilips avatar Oct 15 '21 03:10 ErikPhilips