vue-google-login
vue-google-login copied to clipboard
Can't read access_token inside onSuccess anymore
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?
Try
login.getAuthResponse().id_token
or
login.getBasicProfile().getEmail()
To get the profile email address, for example.