1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | import { ApiKey, AppName, AuthInternal } from '../../model/auth';
|
18 | import { UserInternal } from '../../model/user';
|
19 | import { PersistenceInternal } from '../persistence';
|
20 | export declare const enum KeyName {
|
21 | AUTH_USER = "authUser",
|
22 | AUTH_EVENT = "authEvent",
|
23 | REDIRECT_USER = "redirectUser",
|
24 | PERSISTENCE_USER = "persistence"
|
25 | }
|
26 | export declare const enum Namespace {
|
27 | PERSISTENCE = "firebase"
|
28 | }
|
29 | export declare function _persistenceKeyName(key: string, apiKey: ApiKey, appName: AppName): string;
|
30 | export declare class PersistenceUserManager {
|
31 | persistence: PersistenceInternal;
|
32 | private readonly auth;
|
33 | private readonly userKey;
|
34 | private readonly fullUserKey;
|
35 | private readonly fullPersistenceKey;
|
36 | private readonly boundEventHandler;
|
37 | private constructor();
|
38 | setCurrentUser(user: UserInternal): Promise<void>;
|
39 | getCurrentUser(): Promise<UserInternal | null>;
|
40 | removeCurrentUser(): Promise<void>;
|
41 | savePersistenceForRedirect(): Promise<void>;
|
42 | setPersistence(newPersistence: PersistenceInternal): Promise<void>;
|
43 | delete(): void;
|
44 | static create(auth: AuthInternal, persistenceHierarchy: PersistenceInternal[], userKey?: KeyName): Promise<PersistenceUserManager>;
|
45 | }
|