Supported types of Auth state persistence

We can use one of the three types of the persistence that are available in firebase on specified Firebase Authentication instance(.auth()) based on your application or user's requirements:

Auth instance Value Description

firebase.auth.Auth.Persistence.LOCAL

'local'

It Indicates that the state will be persisted even if we closed the browser window or the activity is destroyed in React Native. For this, explicit sign out is needed to clear that state.

firebase.auth.Auth.Persistence.SESSION

'session'

In this scenario, the state will persist only to the current session or tab and will be cleared when the tab or window is closed in which the user has authenticated.

firebase.auth.Auth.Persistence.NONE ...

Get Serverless Web Applications with React and Firebase now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.