Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'w3' of undefined #8

Open
btilds opened this issue Jan 17, 2021 · 1 comment
Open

Cannot read property 'w3' of undefined #8

btilds opened this issue Jan 17, 2021 · 1 comment

Comments

@btilds
Copy link

btilds commented Jan 17, 2021

Something about authentication and the googleUser variable in App.jsx

Screen Shot 2021-01-16 at 6 27 09 PM

I think something from this function that googleUser isn't set to anything ... not sure.

@josephcooney
Copy link

The code is accessing properties on the user instead of using the API to get them. Google seem to randomize these to prevent people accessing them directly. for example instead of getting the user with googleAuthInstance.currentUser.Ab it should get it via googleAuthInstance.currentUser.get() and instead of getting the user info with const userInfo = this.props.googleUser.w3; it should be const userInfo = this.props.googleUser.getBasicProfile(); etc

Google doco is here https://developers.google.com/identity/sign-in/web/reference#googleauthcurrentuserget

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants