Some of my users get pop up closed by user error. One of my team-mates also get the same error and he fixed it with clearing his cache but we can't ask it to our users, so how can I fix it and be sure about it's fixed.
This is my code if it's related.
<GoogleLogin
clientId="blablabla.apps.googleusercontent.com"
buttonText="LOGIN"
onSuccess={responseGoogle}
onFailure={responseGoogle}
cookiePolicy={'single_host_origin'}
scope={YOUTUBE_SCOPE}
isSignedIn
/>
I got the same error and it was cause by chrome not allowing 3rd party app. Allow third party cookies in your chrome or set the address in the allowed section for cookies.
@gokhandemirhan - I'm a newbie, can you please explain what you mean by "set the address in the allowed section for cookies". Allow third-party cookies is not an option as we don't have control over the diverse set of users.
Sudhamsh add your domain and dev domain to the allowed origins section in
google cloud platform oauth console
On Wed, Oct 7, 2020 at 11:10 PM Sudhamsh notifications@github.com wrote:
>
>
@gokhandemirhan https://github.com/gokhandemirhan - I'm a newbie, can
you please explain what you mean by "set the address in the allowed section
for cookies". Allow third-party cookies is not an option as we don't have
control over the diverse set of users.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/anthonyjgrove/react-google-login/issues/376#issuecomment-705332812,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHZDPRDT2GMIYAWL5SXHFN3SJVCSVANCNFSM4RRG2ALQ
.
But still, I can not ask to apply these solutions from my users. I figured out how to solve for myself but my clients shouldn't have that kind of problem otherwise we can't use this package.
It has nothing to do with the package, it's because of google Oauth. If you want to authenticate with google you have to deal with it. I'm not really sure what the cookie_policy option does but you could try setting it to none maybe. @ozenesat
I had to enable the analytics API feature in GCP for it to work.
window.addEventListener("message", ({ data }) => {
console.log(data)
})
this solved my issue
@virgincodes where do we need to add the event listener ?
@virgincodes where do we need to add the event listener ?
You can add it in your responseGoogle method.
const responseGoogle = (response) => {
window.addEventListener("message", ({ data }) => { console.log(data) });
}