@vmutafov/firebase-auth-node-persistence
Version:
Configurable file-based Firebase Authentication NodeJS persistence
24 lines (22 loc) • 894 B
TypeScript
type NodeFilePersistenceOpts = {
filePath: string;
getStorage?: () => Record<string, any>;
setStorage?: (currentStorage: Record<string, any>) => Promise<void> | void;
};
declare function createNodeFilePersistence(opts: NodeFilePersistenceOpts): {
new (): {
readonly type: any;
getStorage: () => Record<string, any>;
setStorage: (currentStorage: Record<string, any>) => void | Promise<void>;
filePath: string;
storage: Record<string, any>;
_isAvailable(): Promise<boolean>;
_set<T>(key: string, value: T): Promise<void>;
_get<T_1>(key: string): Promise<T_1>;
_remove(key: string): Promise<void>;
_addListener(_key: string, _listener: any): void;
_removeListener(_key: string, _listener: any): void;
};
type: 'NONE';
};
export { NodeFilePersistenceOpts, createNodeFilePersistence };