How do I get the current user's access token in AngularFire2?

后端 未结 7 2196
星月不相逢
星月不相逢 2021-02-08 11:10

In AngularFire you were able to access the providers (e.g Google) accessToken for the authenticated user.

There does not seem to be a way to access this with AngularFire

7条回答
  •  -上瘾入骨i
    2021-02-08 11:27

    Getting the auth token from storage in angularfire2

    JSON.parse(JSON.stringify(this.afAuth.auth.currentUser)).stsTokenManager.accessToken
    

    As seen in this discussion: https://github.com/angular/angularfire2/issues/725

提交回复
热议问题