According to Firebase documentation, a refresh token is only for advanced scenarios that require explicitly refreshing tokens.
In which cases should I use that token, and what are the advantages of using it?
private afAuth: AngularFireAuth
this.afAuth.auth.currentUser.getIdToken()
.then(idToken => // Gives me a different token from key name called pa);
Also, I'm not sure the difference between refreshToken and the returned token from getIdToken()
. Currently, I'm using the latter for HTTP requests.
Note: getIdToken returns a JWT token used to identify the user to a Firebase service.
refreshToken
andonTokenRefresh()
? I don't get it. And I believegetToken()
is deprecated. – Harmonica