Reputation: 91
I'm using firebase on my project and email authentication. I want to be automatically logged out 1 hours after the user logs in. If this not possible, I want to automatically logout when the user closes the website. Can anyone help me? Thanks a lot.
Upvotes: 6
Views: 8901
Reputation: 2203
For second point, set firebase.auth.Auth.Persistence.SESSION
or NONE
.
Read more in: https://firebase.google.com/docs/auth/web/auth-state-persistence#modifying_the_auth_state_persistence
Upvotes: 8