Maha Daoud
Maha Daoud

Reputation: 33

How to check if the session is expired in Firebase

I'm new to swift and Firebase, I'm trying to create an app with email login, I noticed that if the user didn't sign out before closing the application, the value FIRAuth.auth().currentUser.uid is seen as not nil in the second time to run the application

my questions: does the session expire in firebase? what is the duration? can we change it? how to change it and how to check if the session is expired?

Thanks for your help.

Upvotes: 1

Views: 1593

Answers (1)

Christian Abella
Christian Abella

Reputation: 5797

Firebase tokens are long live and will normally not expire. You will get FIRAuthErrorCodeUserTokenExpired error code when the session token has already expired. Expiration will probably occur when the user change the password.

Upvotes: 2

Related Questions