Set auth state persistence (Firebase Auth)
  • 18 May 2022
  • 1 Minute to read
  • Dark
    Light
  • PDF

Set auth state persistence (Firebase Auth)

  • Dark
    Light
  • PDF

Set Firebase Auth state persistence. Only supported on web. Native applications will always persist the auth session over closing the application. Authentication persistence state should be set before user is authenticated.

Persistence types:

  • local: The auth state is stored locally and will persist over closing and opening the application (Firebase default)
  • session: The auth state will persist over the current session
  • none: The auth state will only be preserved in the application memory

If the retrieve operation is successful first output is triggered.

If the operation fails, the second output is triggered.

To use this flow, your app must have Firebase configured in your project.

Input arguments

Label Key Type Required? Default Description
Persistence persistence String Yes local Auth state persistence type

Output arguments

Number of outputs: 2

No output arguments.

Events

No events.

Errors

Label Code Description
Set auth state persistence failed setPersistenceFailed Thrown if setting auth state persistence failed.

Was this article helpful?