It looks like issue #69 is back (or maybe it was never fully fixed?). I'm initializing the component as follows and finding that every page load, even a soft refresh, requires users to complete the OAuth consent prompt.
Any thoughts or hints? I'm using v3.2.0.
<GoogleLogin
clientId={MY_CLIENT_ID}
buttonText="Login with Google"
responseType={"id_token"}
accessType={"offline"}
onSuccess={this.loginSuccess}
onFailure={this.loginFailure}
prompt={"consent"}
/>
I added the isSignedIn={true} prop and it called my onsuccess handler on refresh.
Unfortunately, I found out that if the user is signed out however, there is no way to detect that 馃槩
@protoEvangelion I just tested your isSignedIn={true} right now and it did worked for me.
Thanks!
Closing Due to Inactivity
@protoEvangelion Any workaround? I'm trying to have a "load" spinners while the component decides if the user is logged in, or not. I can see the success being called if he/she is logged in, but nothing happens if not (e.g. incognito tab).
I'm not sure. I'd create a new issue if I was you so the maintainers can respond :) And its been 2 years since this issue opened so things may have changed.
@protoEvangelion Any workaround? I'm trying to have a "load" spinners while the component decides if the user is logged in, or not. I can see the success being called if he/she is logged in, but nothing happens if not (e.g. incognito tab).
The login hook provides a loaded const that you can use to hide your spinner.
Most helpful comment
I added the
isSignedIn={true}prop and it called my onsuccess handler on refresh.