Skip to content

Get Token status #370

Closed Answered by mobizt
b1n0-kun asked this question in Q&A
Jun 15, 2023 · 11 comments · 6 replies
Discussion options

You must be logged in to vote

The current auth token can be obtained from Firebase.getToken().

You can check its status with.

Firebase.authenticated() <- returns Firebase authentication status
Firebase.isTokenExpired() <- returns token expiry status

Firebase.ready() <- returns authentication status AND token expiry status AND network status.

<FirebaseData>.httpConnected() returns server connecting status in almost present time.

Normally, library will refresh the token 5 minutes before it expires (60 - 5 or every 55 minutes). You can set the token refresh time earlier than that default value, e.g., refresh in 10 minutes since it created with.

config.signer.preRefreshSeconds = 3600 - 10 * 60;

Or you want to refresh toke…

Replies: 11 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by mobizt
Comment options

You must be logged in to vote
3 replies
@mobizt
Comment options

@mobizt
Comment options

@mobizt
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mobizt
Comment options

Comment options

You must be logged in to vote
2 replies
@mobizt
Comment options

@b1n0-kun
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #369 on June 15, 2023 07:48.