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

Can't read access_token inside onSuccess anymore #26

Open
marcoarruda opened this issue Nov 19, 2020 · 1 comment
Open

Can't read access_token inside onSuccess anymore #26

marcoarruda opened this issue Nov 19, 2020 · 1 comment

Comments

@marcoarruda
Copy link

marcoarruda commented Nov 19, 2020

My app was reading the access_token inside the onSuccess method like below:

onSuccess (login) {
    const accessToken = login.ws.access_token
}

Suddenly, it is not available anymore, but inside another attribute:

onSuccess (login) {
    const accessToken = login.xc.access_token
}

Is there a method that I can use instead so I don't relay on an attribute like this?
Any chances that GoogleOAuth2 has been updated?

@daltonrooney
Copy link

daltonrooney commented Mar 10, 2021

Try

login.getAuthResponse().id_token

or

login.getBasicProfile().getEmail()

To get the profile email address, for example.

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