I've been working on an AngularJS application that utilizes the basic Google Signin process outlined here: https://developers.google.com/identity/sign-in/web/.
Everything is functioning properly, and I'm able to sign in as a Google user. However, I've encountered a problem when third-party cookies are disabled.
When third-party cookies are turned off in browsers like Chrome (seen in these content settings), the Google sign-in process fails to work.
Specifically, I have a function that should trigger upon a successful sign-in event from the Google button, but nothing happens. Additionally, I'm unable to capture any errors to find a workaround.
Another issue that arises is an error when loading Google metadata with third-party cookies disabled:
Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document
It appears that Google completes the necessary steps correctly upon success but fails to execute the code within the onsuccess function.
I've tried various solutions, including checking Google's integration page where clicking on the sample sign-in button results in the same behavior:
- If I enable cookies, it displays "signed in as: MyName"
- If I disable cookies, no information is returned
The main question remains - is there a way to capture this error, find a workaround, and prevent Google from behaving as if everything is fine without executing the code within the onsuccess function?