React-google-login: Chrome Update Requiring Cookies to Have SameSite

Created on 6 Nov 2019  路  7Comments  路  Source: anthonyjgrove/react-google-login

When authenticating a user with the package, I receive the following in Chrome Dev tools. Not sure if the cookie is being set on the react-google-login side, but thought I'd flag it just in case. If so, the cookie must be set with SameSite=None and Secure.

A cookie associated with a cross-site resource at <URL> was set without theSameSiteattribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set withSameSite=NoneandSecure. You can review cookies in developer tools under Application>Storage>Cookies and see more details at <URL> and <URL>.

Most helpful comment

Feels like this is causing issues still, for me it looks like the onSuccess and onFailure callbacks are not called with the SameSite flags enabled in Chrome. Disabling the flags in Chrome makes the GoogleLogin component work as expected again - both callbacks called, isSignedIn flag working etc.

Environment
react-google-login: ^5.1.20
Chrome Version 84.0.4147.105 (Official Build) (64-bit)

All 7 comments

As a work around until google fixes their end. You can disable SameSite by default in chrome flags.

if that markdown link doesn't work chrome://flags/#same-site-by-default-cookies

Screen Shot 2019-11-06 at 10 14 13 PM 1

Is there any solution that does not require tinkering with the browser settings? And how will this affect the site after deploy? Will it still be broken?

This issue may be insightful to those affected here: https://github.com/google/google-api-javascript-client/issues/561. As far as I am aware, this issue only affects those on beta channel (or more experimental) of Chrome. The popup now displays this warning underneath the account choices.
Screenshot 2019-12-21 at 10 07 18 AM

There is a recent comment mentioning that Google have a fix expected to land in January.

Chrome 80 (~Feb 4) may complicate this a bit further with behavior around secure cookies changing:
https://www.chromestatus.com/feature/5633521622188032 / https://tools.ietf.org/html/draft-west-cookie-incrementalism-00

@anthonyjgrove - do you know if this is being set in your codebase, or outside of it? I took a quick look through the code and I could not find it anywhere. If you think it's in your code, I'm willing to take a pass at fixing this. Let me know.

Feels like this is causing issues still, for me it looks like the onSuccess and onFailure callbacks are not called with the SameSite flags enabled in Chrome. Disabling the flags in Chrome makes the GoogleLogin component work as expected again - both callbacks called, isSignedIn flag working etc.

Environment
react-google-login: ^5.1.20
Chrome Version 84.0.4147.105 (Official Build) (64-bit)

I am having this same issue. My onSuccess and onFailure events are not being called. Disabling all three flags related to SameSite did not fix it.

Environment
react-google-login: ^5.1.21
Opera Version: 70.0.3728.154 (Stable build) (64-bit)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

deitas picture deitas  路  8Comments

pogran picture pogran  路  4Comments

MiLeung picture MiLeung  路  4Comments

bradeac picture bradeac  路  4Comments

eap picture eap  路  7Comments