anthonyjgrove / react-google-login

A React Google Login Component
https://anthonyjgrove.github.io/react-google-login
MIT License
1.85k stars 425 forks source link

Uncaught TypeError: Cannot read properties of undefined (reading 'load') #520

Open prajwalkulkarni opened 2 years ago

prajwalkulkarni commented 2 years ago

Since Google is deprecating libraries for user authentication and authorization, I'm following this migration guide to update all the dependencies. When I update the script src & the jsSrc prop in the GoogleLogin component to https://accounts.google.com/gsi/client, I'm getting this error:

Uncaught TypeError: Cannot read properties of undefined (reading 'load')

I'm not sure how to fix this nor did I find any suitable solution on StackOverflow, does this issue require any updates in the component to get it resolved, or is there anything that can be done by the component users to fix the issue?

pedrovgs commented 2 years ago

I'm in a similar situation :( No idea how to fix this.

ariccio commented 2 years ago

I made no changes, but just saw this issue in prod, at this line:

{snip} _type:A};"code"===_&&(o.access_type="offline"),window.gapi.load("auth2",(function(){var r=window.gapi.auth2.getAuthInstance();r?r.then((func {snip}