How to handle custom firebase token expiry in Firebase 3.x.x

后端 未结 4 1704
孤街浪徒
孤街浪徒 2021-02-04 04:24

I have used \"signInWithCustomToken()\" to authenticate firebase user.

This token expires in 1 hour.

Firebase has recommended tok

4条回答
  •  终归单人心
    2021-02-04 04:49

    The SDK will take care of keeping the tokens up to date IF YOU ARE SETUP correctly. For more info The custom tokens are only used to start a SESSION. So you have to have hour to use a custom token to SIGN IN. Once you are signed in and your Firebase Admin account and app configuration is setup correctly, the SDK can communicate back and forth with the Firebase back-end to keep the tokens up to date. Once you sign out with FirebaseAuth.signout(), you will need a new custom token to sign back in if it has been over 1 hour.

提交回复
热议问题