Files
James DanielsandGitHub f2b02db66a Auth cookie persistence (#8839)
Adding `Persistence.COOKIE` a new persistence method backed by cookies. The `browserCookiePersistence` implementation is designed to be used in conjunction with middleware that ensures both your front and backend authentication state remains synchronized.
2025-03-27 17:53:59 -04:00

1.4 KiB

Project: /docs/reference/js/_project.yaml Book: /docs/reference/_book.yaml page_type: reference

{% comment %} DO NOT EDIT THIS FILE! This is generated by the JS SDK team, and any local changes will be overwritten. Changes should be made in the source code at https://github.com/firebase/firebase-js-sdk {% endcomment %}

Persistence interface

An interface covering the possible persistence mechanism types.

Signature:

export interface Persistence 

Properties

Property Type Description
type 'SESSION' | 'LOCAL' | 'NONE' | 'COOKIE' Type of Persistence. - 'SESSION' is used for temporary persistence such as sessionStorage. - 'LOCAL' is used for long term persistence such as localStorage or IndexedDB. - 'NONE' is used for in-memory, or no persistence. - 'COOKIE' is used for cookie persistence, useful for server-side rendering.

Persistence.type

Type of Persistence. - 'SESSION' is used for temporary persistence such as sessionStorage. - 'LOCAL' is used for long term persistence such as localStorage or IndexedDB. - 'NONE' is used for in-memory, or no persistence. - 'COOKIE' is used for cookie persistence, useful for server-side rendering.

Signature:

readonly type: 'SESSION' | 'LOCAL' | 'NONE' | 'COOKIE';