简体   繁体   中英

Does firebase require code to refresh auth?

I am using Firebase Auth in my iOS app written in swift. I allow authentication via email/password, facebook and google. I am concerned that after a certain time the auth status needs to be refreshed by code I have to write.

Once firebase has successfully logged in a user does it expire? Or will he stay logged in for ever; until signed off by calling the firebase function? Is this the case for all ways of login (email, facebook, google)? I checked google firebase doc but could not find a clear answer.

Once firebase has successfully logged in a user does it expire?

No when you authenticate the user for the first time he will always be authenticated unless he is deleted from the firebase console.

Or will he stay logged in for ever; until signed off by calling the firebase function?

Yes he will stay logged in until you sign out the user example using:

 try! FIRAuth.auth()!.signOut()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM