Skip to content

Unable to renew the token automatically when use Firestore #460

Answered by mobizt
edwardchuang asked this question in Q&A
Discussion options

You must be logged in to vote

The token will be refresh in 55 minutes by default. The Firebase.ready() should be executed in time i.e., within 55 minutes since token generated.

You should make sure that no other codes that block the Firebase.ready() from execution.

If your device time was synched with NTP server or manually set after Firebase.begin, you should call Firebase.begin again to reset the authentication. This is because the time(nullptr) will return the seconds count instead of timestamp when your device time was not synched or set. Then token expiry time is based on the seconds count instead of timestamp in this case.

To test Firebase,ready function to work, you can place this option in setup or anywhere to…

Replies: 6 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@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
Answer selected by edwardchuang
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants