To get Google access token after firebase auth login, I know I can simply do this:
firebase.auth().signInWithPopup(provider).then(function(result) {
var token = result.credential.accessToken;
}
but what if the user is already authenticated and I need the token? is there any way to extract it from the Firebase auth?
I've been through every value of authState
but I couldn't find the google access token I've been looking for.
let token = gapi.auth2.getAuthInstance().currentUser.get().getAuthResponse().id_token; this.afAuth.auth .signInWithCredential(token)
but it says"credential" must be a valid credential.
. Any idea what I have to pass to this method in order to authenticate? – Rushton