-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.d.ts
41 lines (34 loc) · 987 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { NativeEventEmitter } from "react-native";
export = RNFirebaseuiAuth;
declare namespace RNFirebaseuiAuth {
type EventType =
| "AuthStateChanged";
type User = {
uid: string;
displayName: string;
photoURL: string;
email: string;
phoneNumber: string;
providerId: string;
isNewUser: boolean;
creationTimestamp: number;
lastSignInTimestamp: number;
};
interface Config {
providers: string[];
customizations?: string[];
tosUrl?: string;
privacyPolicyUrl?: string;
allowNewEmailAccounts?: boolean;
requireDisplayName?: boolean;
autoUpgradeAnonymousUsers?: boolean;
}
export function signIn(config: Config): Promise<User>;
export function getCurrentUser(): Promise<User|null>;
export function signOut(): Promise<boolean>;
export function deleteUser(): Promise<boolean>;
export const AuthEventEmitter: NativeEventEmitter;
export const AuthEvents: {
AUTH_STATE_CHANGED: EventType;
};
}