mirror of
https://github.com/hanzoai/firebase-js-sdk.git
synced 2026-09-24 16:59:10 +00:00
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.
1.4 KiB
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';