Refreshing Firebase ID and Refresh Tokens

时间:2019-04-17 00:17:37

标签: firebase firebase-authentication token refresh

I'm trying to use Google login in my mobile app. But I'm unable to understand Firebase tokens fully.

I read on the docs that ID tokens live for an hour, and refresh tokens live until a major change happens. So how are ID tokens refreshed? Do I need to refresh them from the client (by unpacking the JWT and checking the expiration date)? Or will the SDK automatically refresh when it's expired?

When Google login tokens (id and access) are exchanged with Firebase, you get back auth credentials. Then you need to sign the user into firebase using this credential. I then deleted the Google account. But when I open the app again, the refresh token doesn't seem to be expired. So when will Firebase detect that the Google account is deleted and expire the refresh token?

0 个答案:

没有答案