@react-native-firebase/auth 25.0.1 → 26.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/RNFBAuth.podspec +14 -6
- package/android/build.gradle +23 -0
- package/android/src/main/java/io/invertase/firebase/auth/{ReactNativeFirebaseAuthModule.java → NativeRNFBTurboAuth.java} +122 -102
- package/android/src/main/java/io/invertase/firebase/auth/ReactNativeFirebaseAuthPackage.java +1 -1
- package/android/src/main/java/io/invertase/firebase/auth/ReactNativeFirebaseAuthSyncException.java +35 -0
- package/android/src/main/java/io/invertase/firebase/auth/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboAuthSpec.java +308 -0
- package/android/src/main/java/io/invertase/firebase/auth/generated/jni/CMakeLists.txt +36 -0
- package/android/src/main/java/io/invertase/firebase/auth/generated/jni/RNFBAuthTurboModules-generated.cpp +392 -0
- package/android/src/main/java/io/invertase/firebase/auth/generated/jni/RNFBAuthTurboModules.h +31 -0
- package/android/src/main/java/io/invertase/firebase/auth/generated/jni/react/renderer/components/RNFBAuthTurboModules/RNFBAuthTurboModulesJSI-generated.cpp +538 -0
- package/android/src/main/java/io/invertase/firebase/auth/generated/jni/react/renderer/components/RNFBAuthTurboModules/RNFBAuthTurboModulesJSI.h +611 -0
- package/app.plugin.js +1 -1
- package/dist/module/ActionCodeURL.js.map +1 -1
- package/dist/module/ConfirmationResult.js.map +1 -1
- package/dist/module/MultiFactorResolver.js.map +1 -1
- package/dist/module/PhoneAuthListener.js +3 -4
- package/dist/module/PhoneAuthListener.js.map +1 -1
- package/dist/module/TotpMultiFactorGenerator.js +1 -1
- package/dist/module/TotpMultiFactorGenerator.js.map +1 -1
- package/dist/module/TotpSecret.js +15 -9
- package/dist/module/TotpSecret.js.map +1 -1
- package/dist/module/User.js +1 -1
- package/dist/module/User.js.map +1 -1
- package/dist/module/credentials/EmailAuthCredential.js.map +1 -1
- package/dist/module/credentials/OAuthCredential.js.map +1 -1
- package/dist/module/getMultiFactorResolver.js +2 -2
- package/dist/module/getMultiFactorResolver.js.map +1 -1
- package/dist/module/index.js +1221 -6
- package/dist/module/index.js.map +1 -1
- package/dist/module/internal/syncNativeError.js +75 -0
- package/dist/module/internal/syncNativeError.js.map +1 -0
- package/dist/module/multiFactor.js +5 -3
- package/dist/module/multiFactor.js.map +1 -1
- package/dist/module/providers/OIDCAuthProvider.js.map +1 -1
- package/dist/module/providers/PhoneAuthProvider.js +4 -4
- package/dist/module/providers/PhoneAuthProvider.js.map +1 -1
- package/dist/module/types/auth.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/module/web/RNFBAuthModule.js +13 -7
- package/dist/module/web/RNFBAuthModule.js.map +1 -1
- package/dist/typescript/lib/ActionCodeURL.d.ts.map +1 -1
- package/dist/typescript/lib/ConfirmationResult.d.ts +2 -2
- package/dist/typescript/lib/ConfirmationResult.d.ts.map +1 -1
- package/dist/typescript/lib/MultiFactorResolver.d.ts +6 -6
- package/dist/typescript/lib/MultiFactorResolver.d.ts.map +1 -1
- package/dist/typescript/lib/PhoneAuthListener.d.ts +1 -4
- package/dist/typescript/lib/PhoneAuthListener.d.ts.map +1 -1
- package/dist/typescript/lib/TotpSecret.d.ts +2 -4
- package/dist/typescript/lib/TotpSecret.d.ts.map +1 -1
- package/dist/typescript/lib/User.d.ts +13 -13
- package/dist/typescript/lib/User.d.ts.map +1 -1
- package/dist/typescript/lib/credentials/EmailAuthCredential.d.ts.map +1 -1
- package/dist/typescript/lib/credentials/OAuthCredential.d.ts.map +1 -1
- package/dist/typescript/lib/getMultiFactorResolver.d.ts +5 -5
- package/dist/typescript/lib/getMultiFactorResolver.d.ts.map +1 -1
- package/dist/typescript/lib/index.d.ts +377 -4
- package/dist/typescript/lib/index.d.ts.map +1 -1
- package/dist/typescript/lib/internal/syncNativeError.d.ts +6 -0
- package/dist/typescript/lib/internal/syncNativeError.d.ts.map +1 -0
- package/dist/typescript/lib/multiFactor.d.ts +9 -9
- package/dist/typescript/lib/multiFactor.d.ts.map +1 -1
- package/dist/typescript/lib/providers/OIDCAuthProvider.d.ts.map +1 -1
- package/dist/typescript/lib/providers/PhoneAuthProvider.d.ts.map +1 -1
- package/dist/typescript/lib/types/auth.d.ts +13 -0
- package/dist/typescript/lib/types/auth.d.ts.map +1 -1
- package/dist/typescript/lib/types/internal.d.ts +44 -47
- package/dist/typescript/lib/types/internal.d.ts.map +1 -1
- package/dist/typescript/lib/version.d.ts +1 -1
- package/dist/typescript/lib/web/RNFBAuthModule.d.ts +4 -4
- package/dist/typescript/lib/web/RNFBAuthModule.d.ts.map +1 -1
- package/ios/RNFBAuth/RNFBAuthModule.h +2 -2
- package/ios/RNFBAuth/{RNFBAuthModule.m → RNFBAuthModule.mm} +408 -297
- package/ios/RNFBAuth.xcodeproj/project.pbxproj +8 -8
- package/ios/generated/RCTAppDependencyProvider.h +25 -0
- package/ios/generated/RCTAppDependencyProvider.mm +55 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.mm +23 -0
- package/ios/generated/RNFBAuthTurboModules/RNFBAuthTurboModules-generated.mm +459 -0
- package/ios/generated/RNFBAuthTurboModules/RNFBAuthTurboModules.h +341 -0
- package/ios/generated/RNFBAuthTurboModulesJSI-generated.cpp +538 -0
- package/ios/generated/RNFBAuthTurboModulesJSI.h +611 -0
- package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
- package/lib/ActionCodeURL.ts +3 -9
- package/lib/ConfirmationResult.ts +3 -6
- package/lib/MultiFactorResolver.ts +8 -8
- package/lib/PhoneAuthListener.ts +6 -10
- package/lib/TotpMultiFactorGenerator.ts +1 -1
- package/lib/TotpSecret.ts +22 -9
- package/lib/User.ts +38 -51
- package/lib/credentials/EmailAuthCredential.ts +1 -5
- package/lib/credentials/OAuthCredential.ts +4 -1
- package/lib/getMultiFactorResolver.ts +9 -9
- package/lib/index.ts +1836 -6
- package/lib/internal/syncNativeError.ts +89 -0
- package/lib/multiFactor.ts +24 -18
- package/lib/providers/OIDCAuthProvider.ts +1 -5
- package/lib/providers/PhoneAuthProvider.ts +9 -22
- package/lib/types/auth.ts +15 -0
- package/lib/types/internal.ts +68 -73
- package/lib/version.ts +1 -1
- package/lib/web/RNFBAuthModule.ts +13 -10
- package/package.json +30 -4
- package/plugin/build/app.plugin.d.ts +2 -0
- package/plugin/build/app.plugin.js +6 -0
- package/plugin/src/app.plugin.ts +3 -0
- package/plugin/tsconfig.tsbuildinfo +1 -1
- package/react-native.config.js +9 -0
- package/specs/NativeRNFBTurboAuth.ts +143 -0
- package/typedoc.json +0 -1
- package/dist/module/modular.js +0 -793
- package/dist/module/modular.js.map +0 -1
- package/dist/module/namespaced.js +0 -522
- package/dist/module/namespaced.js.map +0 -1
- package/dist/module/types/namespaced.js +0 -62
- package/dist/module/types/namespaced.js.map +0 -1
- package/dist/typescript/lib/modular.d.ts +0 -370
- package/dist/typescript/lib/modular.d.ts.map +0 -1
- package/dist/typescript/lib/namespaced.d.ts +0 -12
- package/dist/typescript/lib/namespaced.d.ts.map +0 -1
- package/dist/typescript/lib/types/namespaced.d.ts +0 -2185
- package/dist/typescript/lib/types/namespaced.d.ts.map +0 -1
- package/lib/modular.ts +0 -1172
- package/lib/namespaced.ts +0 -846
- package/lib/types/namespaced.ts +0 -2350
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IdTokenResult, UserInfo, UserMetadata } from './types/auth';
|
|
2
|
-
import type {
|
|
2
|
+
import type { AuthProvider, AuthCredential, ActionCodeSettings, MultiFactor, UpdateProfile, UserCredential } from './types/auth';
|
|
3
3
|
import type { AuthInternal, NativeUserInternal } from './types/internal';
|
|
4
|
-
type AuthProviderWithObject =
|
|
4
|
+
type AuthProviderWithObject = AuthProvider & {
|
|
5
5
|
toObject(): Record<string, unknown>;
|
|
6
6
|
};
|
|
7
7
|
export default class User {
|
|
@@ -15,7 +15,7 @@ export default class User {
|
|
|
15
15
|
get emailVerified(): boolean;
|
|
16
16
|
get isAnonymous(): boolean;
|
|
17
17
|
get metadata(): UserMetadata;
|
|
18
|
-
get multiFactor():
|
|
18
|
+
get multiFactor(): MultiFactor | null;
|
|
19
19
|
get phoneNumber(): string | null;
|
|
20
20
|
get tenantId(): string | null;
|
|
21
21
|
get photoURL(): string | null;
|
|
@@ -25,21 +25,21 @@ export default class User {
|
|
|
25
25
|
delete(): Promise<void>;
|
|
26
26
|
getIdToken(forceRefresh?: boolean): Promise<string>;
|
|
27
27
|
getIdTokenResult(forceRefresh?: boolean): Promise<IdTokenResult>;
|
|
28
|
-
linkWithCredential(credential:
|
|
29
|
-
linkWithPopup(provider: AuthProviderWithObject): Promise<
|
|
30
|
-
linkWithRedirect(provider: AuthProviderWithObject): Promise<
|
|
31
|
-
reauthenticateWithCredential(credential:
|
|
32
|
-
reauthenticateWithPopup(provider: AuthProviderWithObject): Promise<
|
|
28
|
+
linkWithCredential(credential: AuthCredential): Promise<UserCredential>;
|
|
29
|
+
linkWithPopup(provider: AuthProviderWithObject): Promise<UserCredential>;
|
|
30
|
+
linkWithRedirect(provider: AuthProviderWithObject): Promise<UserCredential>;
|
|
31
|
+
reauthenticateWithCredential(credential: AuthCredential): Promise<UserCredential>;
|
|
32
|
+
reauthenticateWithPopup(provider: AuthProviderWithObject): Promise<UserCredential>;
|
|
33
33
|
reauthenticateWithRedirect(provider: AuthProviderWithObject): Promise<void>;
|
|
34
34
|
reload(): Promise<void>;
|
|
35
|
-
sendEmailVerification(actionCodeSettings?:
|
|
35
|
+
sendEmailVerification(actionCodeSettings?: ActionCodeSettings): Promise<void>;
|
|
36
36
|
toJSON(): object;
|
|
37
|
-
unlink(providerId: string): Promise<
|
|
37
|
+
unlink(providerId: string): Promise<import('./types/auth').User>;
|
|
38
38
|
updateEmail(email: string): Promise<void>;
|
|
39
39
|
updatePassword(password: string): Promise<void>;
|
|
40
|
-
updatePhoneNumber(credential:
|
|
41
|
-
updateProfile(updates:
|
|
42
|
-
verifyBeforeUpdateEmail(newEmail: string, actionCodeSettings?:
|
|
40
|
+
updatePhoneNumber(credential: AuthCredential): Promise<void>;
|
|
41
|
+
updateProfile(updates: UpdateProfile): Promise<void>;
|
|
42
|
+
verifyBeforeUpdateEmail(newEmail: string, actionCodeSettings?: ActionCodeSettings): Promise<void>;
|
|
43
43
|
/**
|
|
44
44
|
* KNOWN UNSUPPORTED METHODS
|
|
45
45
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../lib/User.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../lib/User.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,cAAc,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEzE,KAAK,sBAAsB,GAAG,YAAY,GAAG;IAC3C,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,IAAI;IACvB,gBAAgB;IAChB,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;IAC7B,gBAAgB;IAChB,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC;gBAEvB,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,kBAAkB;IAKxD,IAAI,WAAW,IAAI,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IAAI,MAAM;IAIhB,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,cAAc,EAAE,IAAI,CAAC;IAUhE,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMzC,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAM/C,iBAAiB,CAAC,UAAU,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ5D,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAMpD,uBAAuB,CACrB,QAAQ,EAAE,MAAM,EAChB,kBAAkB,CAAC,EAAE,kBAAkB,GACtC,OAAO,CAAC,IAAI,CAAC;IA2EhB;;OAEG;IAEH,mBAAmB,IAAI,KAAK;IAM5B,6BAA6B,IAAI,KAAK;IAMtC,IAAI,YAAY,IAAI,KAAK,CAExB;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailAuthCredential.d.ts","sourceRoot":"","sources":["../../../../lib/credentials/EmailAuthCredential.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AASvE,qBAAa,mBAAoB,SAAQ,cAAc;
|
|
1
|
+
{"version":3,"file":"EmailAuthCredential.d.ts","sourceRoot":"","sources":["../../../../lib/credentials/EmailAuthCredential.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AASvE,qBAAa,mBAAoB,SAAQ,cAAc;gBACzC,YAAY,EAAE,UAAU,GAAG,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAInF,MAAM,IAAI,MAAM;IAShB,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,mBAAmB,GAAG,IAAI;CAiBnE;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,UAAU,GAAG,WAAW,GACrC,mBAAmB,CAErB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OAuthCredential.d.ts","sourceRoot":"","sources":["../../../../lib/credentials/OAuthCredential.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AAYvE,KAAK,qBAAqB,GAAG;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;
|
|
1
|
+
{"version":3,"file":"OAuthCredential.d.ts","sourceRoot":"","sources":["../../../../lib/credentials/OAuthCredential.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AAYvE,KAAK,qBAAqB,GAAG;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAkCF,qBAAa,eAAgB,SAAQ,cAAc;IACjD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,kLAAkL;IAClL,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAEf,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB;IAQ7D,MAAM,IAAI,MAAM;IAgBhB,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,eAAe,GAAG,IAAI;CAa/D"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { MultiFactorError, MultiFactorResolver } from './types/auth';
|
|
2
2
|
import type { AuthInternal } from './types/internal';
|
|
3
|
-
type ErrorWithResolver =
|
|
3
|
+
type ErrorWithResolver = MultiFactorError & {
|
|
4
4
|
userInfo?: {
|
|
5
5
|
resolver?: {
|
|
6
|
-
hints:
|
|
7
|
-
session:
|
|
6
|
+
hints: MultiFactorResolver['hints'];
|
|
7
|
+
session: MultiFactorResolver['session'];
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
10
|
};
|
|
@@ -14,6 +14,6 @@ type ErrorWithResolver = FirebaseAuthTypes.MultiFactorError & {
|
|
|
14
14
|
*
|
|
15
15
|
* Returns null if no resolver object can be found on the error.
|
|
16
16
|
*/
|
|
17
|
-
export declare function getMultiFactorResolver(auth: AuthInternal, error: ErrorWithResolver):
|
|
17
|
+
export declare function getMultiFactorResolver(auth: AuthInternal, error: ErrorWithResolver): MultiFactorResolver | null;
|
|
18
18
|
export {};
|
|
19
19
|
//# sourceMappingURL=getMultiFactorResolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getMultiFactorResolver.d.ts","sourceRoot":"","sources":["../../../lib/getMultiFactorResolver.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"getMultiFactorResolver.d.ts","sourceRoot":"","sources":["../../../lib/getMultiFactorResolver.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,KAAK,iBAAiB,GAAG,gBAAgB,GAAG;IAC1C,QAAQ,CAAC,EAAE;QACT,QAAQ,CAAC,EAAE;YACT,KAAK,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;YACpC,OAAO,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;SACzC,CAAC;KACH,CAAC;CACH,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,iBAAiB,GACvB,mBAAmB,GAAG,IAAI,CAgB5B"}
|
|
@@ -1,8 +1,381 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modular Auth API for React Native Firebase.
|
|
3
|
+
*
|
|
4
|
+
* Most exports mirror the [firebase-js-sdk modular Auth API](https://firebase.google.com/docs/reference/js/auth).
|
|
5
|
+
* Remarks on individual symbols call out React Native-specific behavior, unsupported
|
|
6
|
+
* web-only APIs, and return-type differences.
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
import './types/internal';
|
|
1
11
|
export type * from './types/auth';
|
|
2
12
|
export { ActionCodeURL } from './ActionCodeURL';
|
|
3
13
|
export { AuthCredential, EmailAuthCredential, OAuthCredential, PhoneAuthCredential, } from './credentials';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
14
|
+
import { ActionCodeURL } from './ActionCodeURL';
|
|
15
|
+
import { PhoneAuthState } from './PhoneAuthState';
|
|
16
|
+
import PhoneMultiFactorGenerator from './PhoneMultiFactorGenerator';
|
|
17
|
+
import TotpMultiFactorGenerator from './TotpMultiFactorGenerator';
|
|
18
|
+
import { TotpSecret } from './TotpSecret';
|
|
19
|
+
import AppleAuthProvider from './providers/AppleAuthProvider';
|
|
20
|
+
import EmailAuthProvider from './providers/EmailAuthProvider';
|
|
21
|
+
import FacebookAuthProvider from './providers/FacebookAuthProvider';
|
|
22
|
+
import GithubAuthProvider from './providers/GithubAuthProvider';
|
|
23
|
+
import GoogleAuthProvider from './providers/GoogleAuthProvider';
|
|
24
|
+
import OAuthProvider from './providers/OAuthProvider';
|
|
25
|
+
import OIDCAuthProvider from './providers/OIDCAuthProvider';
|
|
26
|
+
import PhoneAuthProvider from './providers/PhoneAuthProvider';
|
|
27
|
+
import TwitterAuthProvider from './providers/TwitterAuthProvider';
|
|
28
|
+
import { ActionCodeOperation, FactorId, OperationType, ProviderId, SignInMethod } from './constants';
|
|
29
|
+
import type { FirebaseApp } from '@react-native-firebase/app';
|
|
30
|
+
import type { ActionCodeInfo, ActionCodeSettings, AdditionalUserInfo, ApplicationVerifier, Auth, AuthCredential, AuthProvider, CompleteFn, ConfirmationResult, Dependencies, ErrorFn, IdTokenResult, MultiFactorError, MultiFactorResolver, MultiFactorUser, NextOrObserver, PasswordValidationStatus, Persistence, PhoneAuthCredential, PhoneAuthListener, PopupRedirectResolver, Unsubscribe, User, UserCredential } from './types/auth';
|
|
31
|
+
export { AppleAuthProvider, EmailAuthProvider, FacebookAuthProvider, GithubAuthProvider, GoogleAuthProvider, OAuthProvider, OIDCAuthProvider, PhoneAuthProvider, PhoneAuthState, PhoneMultiFactorGenerator, TotpMultiFactorGenerator, TotpSecret, TwitterAuthProvider, ActionCodeOperation, FactorId, OperationType, ProviderId, SignInMethod, };
|
|
32
|
+
/**
|
|
33
|
+
* Returns the Auth instance associated with the provided FirebaseApp.
|
|
34
|
+
*
|
|
35
|
+
* @param app - The Firebase app instance. Defaults to the default app.
|
|
36
|
+
*/
|
|
37
|
+
export declare function getAuth(app?: FirebaseApp): Auth;
|
|
38
|
+
/**
|
|
39
|
+
* This function allows more control over the Auth instance than getAuth().
|
|
40
|
+
*
|
|
41
|
+
* @param app - The Firebase app to initialize Auth for.
|
|
42
|
+
* @param _deps - Optional firebase-js-sdk dependency bag.
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* The optional `deps` argument exists for firebase-js-sdk API parity. React Native Firebase
|
|
46
|
+
* ignores persistence, popup redirect resolver, and error-map dependencies because native
|
|
47
|
+
* iOS/Android SDKs manage auth state and do not support the web-only persistence stack.
|
|
48
|
+
* `initializeAuth()` returns the same shared Auth instance as {@link getAuth}.
|
|
49
|
+
*/
|
|
50
|
+
export declare function initializeAuth(app: FirebaseApp, _deps?: Dependencies): Auth;
|
|
51
|
+
/**
|
|
52
|
+
* Applies an out-of-band email action code (for example from a password reset or email verification link).
|
|
53
|
+
*/
|
|
54
|
+
export declare function applyActionCode(auth: Auth, oobCode: string): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Registers a callback to run before an auth state change is committed.
|
|
57
|
+
*
|
|
58
|
+
* @returns An unsubscribe function.
|
|
59
|
+
*/
|
|
60
|
+
export declare function beforeAuthStateChanged(auth: Auth, callback: (user: User | null) => void | Promise<void>, onAbort?: () => void): Unsubscribe;
|
|
61
|
+
/**
|
|
62
|
+
* Checks the validity of an out-of-band email action code and returns metadata about the pending operation.
|
|
63
|
+
*
|
|
64
|
+
* @remarks React Native Firebase normalizes native results toward firebase-js-sdk shapes, including mapping
|
|
65
|
+
* `fromEmail` to `previousEmail` and coercing multi-factor info objects.
|
|
66
|
+
*/
|
|
67
|
+
export declare function checkActionCode(auth: Auth, oobCode: string): Promise<ActionCodeInfo>;
|
|
68
|
+
/**
|
|
69
|
+
* Confirms a password reset using the out-of-band code from the reset email.
|
|
70
|
+
*/
|
|
71
|
+
export declare function confirmPasswordReset(auth: Auth, oobCode: string, newPassword: string): Promise<void>;
|
|
72
|
+
/**
|
|
73
|
+
* Connects the Auth instance to the Auth emulator.
|
|
74
|
+
*
|
|
75
|
+
* @remarks Delegates to the native `useEmulator` bridge. Accepts the firebase-js-sdk
|
|
76
|
+
* `options.disableWarnings` flag for {@link Auth.emulatorConfig} parity. On web, that flag
|
|
77
|
+
* suppresses the emulator DOM warning banner; native iOS/Android SDKs do not surface that banner,
|
|
78
|
+
* so the value is recorded on `auth.emulatorConfig.options` only. When `options` is provided,
|
|
79
|
+
* `disableWarnings` is required (matching firebase-js-sdk).
|
|
80
|
+
*/
|
|
81
|
+
export declare function connectAuthEmulator(auth: Auth, url: string, options?: {
|
|
82
|
+
disableWarnings: boolean;
|
|
83
|
+
}): void;
|
|
84
|
+
/**
|
|
85
|
+
* Creates a new user with an email address and password.
|
|
86
|
+
*
|
|
87
|
+
* @remarks Returned {@link UserCredential} objects include top-level `providerId` and `operationType`
|
|
88
|
+
* fields. `additionalUserInfo`, when present, is attached as a non-enumerable property.
|
|
89
|
+
*/
|
|
90
|
+
export declare function createUserWithEmailAndPassword(auth: Auth, email: string, password: string): Promise<UserCredential>;
|
|
91
|
+
/**
|
|
92
|
+
* Fetches the sign-in methods available for the given email address.
|
|
93
|
+
*/
|
|
94
|
+
export declare function fetchSignInMethodsForEmail(auth: Auth, email: string): Promise<string[]>;
|
|
95
|
+
/**
|
|
96
|
+
* Extracts a {@link MultiFactorResolver} from a {@link MultiFactorError}.
|
|
97
|
+
*
|
|
98
|
+
* @throws If the error does not contain resolver hints.
|
|
99
|
+
*/
|
|
100
|
+
export declare function getMultiFactorResolver(auth: Auth, error: MultiFactorError): MultiFactorResolver;
|
|
101
|
+
/**
|
|
102
|
+
* Returns the redirect sign-in result after a browser redirect flow completes.
|
|
103
|
+
*
|
|
104
|
+
* @remarks
|
|
105
|
+
* **Not supported on React Native Firebase.** Always throws synchronously because native provider
|
|
106
|
+
* flows do not use the browser redirect contract from the firebase-js-sdk.
|
|
107
|
+
*/
|
|
108
|
+
export declare function getRedirectResult(_auth: Auth, _resolver?: PopupRedirectResolver): Promise<UserCredential | null>;
|
|
109
|
+
/**
|
|
110
|
+
* Checks whether an email link is a valid sign-in with email link URL.
|
|
111
|
+
*
|
|
112
|
+
*/
|
|
113
|
+
export declare function isSignInWithEmailLink(auth: Auth, emailLink: string): boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Subscribes to auth state changes for the given Auth instance.
|
|
116
|
+
*
|
|
117
|
+
* @returns An unsubscribe function.
|
|
118
|
+
*
|
|
119
|
+
* @remarks The legacy `error` and `completed` callback overload exists for firebase-js-sdk API parity.
|
|
120
|
+
* Native auth listeners never invoke separate error or completed callbacks.
|
|
121
|
+
*/
|
|
122
|
+
export declare function onAuthStateChanged(auth: Auth, nextOrObserver: NextOrObserver<User>, _error?: ErrorFn, _completed?: CompleteFn): Unsubscribe;
|
|
123
|
+
/**
|
|
124
|
+
* Subscribes to ID token changes for the given Auth instance.
|
|
125
|
+
*
|
|
126
|
+
* @returns An unsubscribe function.
|
|
127
|
+
*
|
|
128
|
+
* @remarks The legacy `error` and `completed` callback overload exists for firebase-js-sdk API parity.
|
|
129
|
+
* Native auth listeners never invoke separate error or completed callbacks.
|
|
130
|
+
*/
|
|
131
|
+
export declare function onIdTokenChanged(auth: Auth, nextOrObserver: NextOrObserver<User>, _error?: ErrorFn, _completed?: CompleteFn): Unsubscribe;
|
|
132
|
+
/**
|
|
133
|
+
* Revokes the given OAuth access token for the current user.
|
|
134
|
+
*
|
|
135
|
+
* @remarks
|
|
136
|
+
* **Web only.** Always throws synchronously on React Native Firebase.
|
|
137
|
+
*/
|
|
138
|
+
export declare function revokeAccessToken(_auth: Auth, _token: string): Promise<void>;
|
|
139
|
+
/**
|
|
140
|
+
* Revokes a user's Sign in with Apple token.
|
|
141
|
+
*
|
|
142
|
+
* @remarks
|
|
143
|
+
* React Native Firebase-specific API required by Apple's account-deletion guidelines.
|
|
144
|
+
* **Supported on iOS** via the native `revokeTokenWithAuthorizationCode` bridge.
|
|
145
|
+
* On Android and Web the bridge resolves without performing revocation (no-op).
|
|
146
|
+
* Distinct from firebase-js-sdk {@link revokeAccessToken}, which revokes OAuth access tokens on Web only.
|
|
147
|
+
*/
|
|
148
|
+
export declare function revokeToken(auth: Auth, authorizationCode: string): Promise<void>;
|
|
149
|
+
/**
|
|
150
|
+
* Sends a password reset email to the given address.
|
|
151
|
+
*/
|
|
152
|
+
export declare function sendPasswordResetEmail(auth: Auth, email: string, actionCodeSettings?: ActionCodeSettings): Promise<void>;
|
|
153
|
+
/**
|
|
154
|
+
* Sends a sign-in with email link to the given address.
|
|
155
|
+
*
|
|
156
|
+
* @remarks `actionCodeSettings` is required in the modular API (matching firebase-js-sdk).
|
|
157
|
+
* The namespaced `firebase.auth().sendSignInLinkToEmail(email, settings?)` API still supplies
|
|
158
|
+
* defaults when settings are omitted.
|
|
159
|
+
*/
|
|
160
|
+
export declare function sendSignInLinkToEmail(auth: Auth, email: string, actionCodeSettings: ActionCodeSettings): Promise<void>;
|
|
161
|
+
/**
|
|
162
|
+
* Sets the persistence type for the Auth instance.
|
|
163
|
+
*
|
|
164
|
+
* @remarks
|
|
165
|
+
* **Not supported on React Native Firebase.** Always throws synchronously because auth state is
|
|
166
|
+
* managed by the native iOS/Android SDKs rather than the web persistence stack.
|
|
167
|
+
*/
|
|
168
|
+
export declare function setPersistence(_auth: Auth, _persistence: Persistence): Promise<void>;
|
|
169
|
+
/**
|
|
170
|
+
* Signs in anonymously.
|
|
171
|
+
*/
|
|
172
|
+
export declare function signInAnonymously(auth: Auth): Promise<UserCredential>;
|
|
173
|
+
/**
|
|
174
|
+
* Signs in with the given auth credential.
|
|
175
|
+
*/
|
|
176
|
+
export declare function signInWithCredential(auth: Auth, credential: AuthCredential): Promise<UserCredential>;
|
|
177
|
+
/**
|
|
178
|
+
* Signs in with a custom authentication token.
|
|
179
|
+
*/
|
|
180
|
+
export declare function signInWithCustomToken(auth: Auth, customToken: string): Promise<UserCredential>;
|
|
181
|
+
/**
|
|
182
|
+
* Signs in with an email address and password.
|
|
183
|
+
*/
|
|
184
|
+
export declare function signInWithEmailAndPassword(auth: Auth, email: string, password: string): Promise<UserCredential>;
|
|
185
|
+
/**
|
|
186
|
+
* Signs in using an email and sign-in with email link.
|
|
187
|
+
*
|
|
188
|
+
* @remarks The `emailLink` argument is optional, matching firebase-js-sdk.
|
|
189
|
+
*/
|
|
190
|
+
export declare function signInWithEmailLink(auth: Auth, email: string, emailLink?: string): Promise<UserCredential>;
|
|
191
|
+
/**
|
|
192
|
+
* Signs in with a phone number and returns a confirmation result for SMS verification.
|
|
193
|
+
*
|
|
194
|
+
* @remarks
|
|
195
|
+
* Native SDKs own the phone verification flow. The optional `appVerifier` argument from the
|
|
196
|
+
* firebase-js-sdk is ignored. This modular API also does not accept RNFB's legacy `forceResend`
|
|
197
|
+
* argument — use {@link verifyPhoneNumber} for the native listener / force-resend flow instead.
|
|
198
|
+
*/
|
|
199
|
+
export declare function signInWithPhoneNumber(auth: Auth, phoneNumber: string, _appVerifier?: ApplicationVerifier): Promise<ConfirmationResult>;
|
|
200
|
+
/**
|
|
201
|
+
* Starts native phone number verification and returns a listener for verification events.
|
|
202
|
+
*
|
|
203
|
+
* @remarks React Native Firebase-specific API with no firebase-js-sdk equivalent. Use this for
|
|
204
|
+
* auto-verification, resend, and multi-step phone auth flows that require native callbacks.
|
|
205
|
+
*/
|
|
206
|
+
export declare function verifyPhoneNumber(auth: Auth, phoneNumber: string, autoVerifyTimeoutOrForceResend?: number | boolean, forceResend?: boolean): PhoneAuthListener;
|
|
207
|
+
/**
|
|
208
|
+
* Signs in with the given provider using a native popup-style flow where supported.
|
|
209
|
+
*/
|
|
210
|
+
export declare function signInWithPopup(auth: Auth, provider: AuthProvider, _resolver?: PopupRedirectResolver): Promise<UserCredential>;
|
|
211
|
+
/**
|
|
212
|
+
* Signs in with the given provider using a redirect-style flow.
|
|
213
|
+
*
|
|
214
|
+
* @remarks On React Native Firebase, native provider flows complete immediately and resolve with a
|
|
215
|
+
* {@link UserCredential} instead of following the browser redirect contract used by the
|
|
216
|
+
* firebase-js-sdk (which resolves later via {@link getRedirectResult}).
|
|
217
|
+
*/
|
|
218
|
+
export declare function signInWithRedirect(auth: Auth, provider: AuthProvider, _resolver?: PopupRedirectResolver): Promise<UserCredential>;
|
|
219
|
+
/**
|
|
220
|
+
* Signs out the current user for the given Auth instance.
|
|
221
|
+
*/
|
|
222
|
+
export declare function signOut(auth: Auth): Promise<void>;
|
|
223
|
+
/**
|
|
224
|
+
* Updates the currently signed-in user on the Auth instance.
|
|
225
|
+
*/
|
|
226
|
+
export declare function updateCurrentUser(auth: Auth, user: User | null): Promise<void>;
|
|
227
|
+
/**
|
|
228
|
+
* Sets the Auth `languageCode` from the device locale.
|
|
229
|
+
*
|
|
230
|
+
* @remarks
|
|
231
|
+
* **Not supported on React Native Firebase.** Always throws synchronously. Set `auth.languageCode`
|
|
232
|
+
* directly or use {@link setLanguageCode}.
|
|
233
|
+
*/
|
|
234
|
+
export declare function useDeviceLanguage(_auth: Auth): void;
|
|
235
|
+
/**
|
|
236
|
+
* Sets the Auth language code.
|
|
237
|
+
*
|
|
238
|
+
* @remarks React Native Firebase exposes this as a modular helper. The firebase-js-sdk only exposes
|
|
239
|
+
* the writable `auth.languageCode` property.
|
|
240
|
+
*/
|
|
241
|
+
export declare function setLanguageCode(auth: Auth, languageCode: string | null): Promise<void>;
|
|
242
|
+
/**
|
|
243
|
+
* Configures iOS keychain access group sharing for the Auth instance.
|
|
244
|
+
*
|
|
245
|
+
* @remarks **iOS only** React Native Firebase helper with no firebase-js-sdk equivalent.
|
|
246
|
+
* Enables sharing auth state across apps in the same access group (e.g. app extensions).
|
|
247
|
+
*/
|
|
248
|
+
export declare function useUserAccessGroup(auth: Auth, userAccessGroup: string): Promise<void>;
|
|
249
|
+
/**
|
|
250
|
+
* Verifies a password reset code and returns the associated email address.
|
|
251
|
+
*/
|
|
252
|
+
export declare function verifyPasswordResetCode(auth: Auth, code: string): Promise<string>;
|
|
253
|
+
/**
|
|
254
|
+
* Parses an email action link string.
|
|
255
|
+
*
|
|
256
|
+
* @param link - The email action link to parse.
|
|
257
|
+
* @returns The {@link ActionCodeURL} object, or `null` if the link is invalid.
|
|
258
|
+
*
|
|
259
|
+
* @remarks Pure URL parsing (ported from firebase-js-sdk). Works on all platforms without a native
|
|
260
|
+
* bridge. See also {@link ActionCodeURL.parseLink}.
|
|
261
|
+
*/
|
|
262
|
+
export declare function parseActionCodeURL(link: string): ActionCodeURL | null;
|
|
263
|
+
/**
|
|
264
|
+
* Deletes the given user account.
|
|
265
|
+
*/
|
|
266
|
+
export declare function deleteUser(user: User): Promise<void>;
|
|
267
|
+
/**
|
|
268
|
+
* Returns the current ID token for the user.
|
|
269
|
+
*/
|
|
270
|
+
export declare function getIdToken(user: User, forceRefresh?: boolean): Promise<string>;
|
|
271
|
+
/**
|
|
272
|
+
* Returns the decoded ID token result for the user.
|
|
273
|
+
*/
|
|
274
|
+
export declare function getIdTokenResult(user: User, forceRefresh?: boolean): Promise<IdTokenResult>;
|
|
275
|
+
/**
|
|
276
|
+
* Links the user account with the given credential.
|
|
277
|
+
*/
|
|
278
|
+
export declare function linkWithCredential(user: User, credential: AuthCredential): Promise<UserCredential>;
|
|
279
|
+
/**
|
|
280
|
+
* Links the user account with a phone number using SMS verification.
|
|
281
|
+
*
|
|
282
|
+
* @remarks
|
|
283
|
+
* **Not supported on React Native Firebase.** Always throws synchronously.
|
|
284
|
+
*/
|
|
285
|
+
export declare function linkWithPhoneNumber(_user: User, _phoneNumber: string, _appVerifier?: ApplicationVerifier): Promise<ConfirmationResult>;
|
|
286
|
+
/**
|
|
287
|
+
* Links the user account with the given provider using a native popup-style flow where supported.
|
|
288
|
+
*/
|
|
289
|
+
export declare function linkWithPopup(user: User, provider: AuthProvider, _resolver?: PopupRedirectResolver): Promise<UserCredential>;
|
|
290
|
+
/**
|
|
291
|
+
* Links the user account with the given provider using a redirect-style flow.
|
|
292
|
+
*
|
|
293
|
+
* @remarks On React Native Firebase, native provider flows complete immediately and resolve with a
|
|
294
|
+
* {@link UserCredential} instead of following the browser redirect contract used by the
|
|
295
|
+
* firebase-js-sdk.
|
|
296
|
+
*/
|
|
297
|
+
export declare function linkWithRedirect(user: User, provider: AuthProvider, _resolver?: PopupRedirectResolver): Promise<UserCredential>;
|
|
298
|
+
/**
|
|
299
|
+
* Returns the multi-factor interface for the given user.
|
|
300
|
+
*
|
|
301
|
+
* @remarks Uses the user's own Auth instance instead of always calling {@link getAuth}, which fixes
|
|
302
|
+
* secondary Firebase app usage compared with earlier RNFB behavior.
|
|
303
|
+
*/
|
|
304
|
+
export declare function multiFactor(user: User): MultiFactorUser;
|
|
305
|
+
/**
|
|
306
|
+
* Reauthenticates the user with the given credential.
|
|
307
|
+
*/
|
|
308
|
+
export declare function reauthenticateWithCredential(user: User, credential: AuthCredential): Promise<UserCredential>;
|
|
309
|
+
/**
|
|
310
|
+
* Reauthenticates the user with a phone number using SMS verification.
|
|
311
|
+
*
|
|
312
|
+
* @remarks
|
|
313
|
+
* **Not supported on React Native Firebase.** Always throws synchronously.
|
|
314
|
+
*/
|
|
315
|
+
export declare function reauthenticateWithPhoneNumber(_user: User, _phoneNumber: string, _appVerifier?: ApplicationVerifier): Promise<ConfirmationResult>;
|
|
316
|
+
/**
|
|
317
|
+
* Reauthenticates the user with the given provider using a native popup-style flow where supported.
|
|
318
|
+
*/
|
|
319
|
+
export declare function reauthenticateWithPopup(user: User, provider: AuthProvider, _resolver?: PopupRedirectResolver): Promise<UserCredential>;
|
|
320
|
+
/**
|
|
321
|
+
* Reauthenticates the user with the given provider using a redirect-style flow.
|
|
322
|
+
*
|
|
323
|
+
* @remarks On React Native Firebase, native provider flows do not follow the browser redirect
|
|
324
|
+
* contract. This resolves with `void` after the native flow completes instead of the
|
|
325
|
+
* firebase-js-sdk `Promise<never>` signature used for unresolved browser redirects.
|
|
326
|
+
*/
|
|
327
|
+
export declare function reauthenticateWithRedirect(user: User, provider: AuthProvider, _resolver?: PopupRedirectResolver): Promise<void>;
|
|
328
|
+
/**
|
|
329
|
+
* Reloads the user's profile data from the server.
|
|
330
|
+
*/
|
|
331
|
+
export declare function reload(user: User): Promise<void>;
|
|
332
|
+
/**
|
|
333
|
+
* Sends an email verification message to the user.
|
|
334
|
+
*/
|
|
335
|
+
export declare function sendEmailVerification(user: User, actionCodeSettings?: ActionCodeSettings | null): Promise<void>;
|
|
336
|
+
/**
|
|
337
|
+
* Unlinks a provider from the user account.
|
|
338
|
+
*/
|
|
339
|
+
export declare function unlink(user: User, providerId: string): Promise<User>;
|
|
340
|
+
/**
|
|
341
|
+
* Updates the user's email address.
|
|
342
|
+
*/
|
|
343
|
+
export declare function updateEmail(user: User, newEmail: string): Promise<void>;
|
|
344
|
+
/**
|
|
345
|
+
* Updates the user's password.
|
|
346
|
+
*/
|
|
347
|
+
export declare function updatePassword(user: User, newPassword: string): Promise<void>;
|
|
348
|
+
/**
|
|
349
|
+
* Updates the user's phone number using a phone auth credential.
|
|
350
|
+
*/
|
|
351
|
+
export declare function updatePhoneNumber(user: User, credential: PhoneAuthCredential): Promise<void>;
|
|
352
|
+
/**
|
|
353
|
+
* Updates the user's display name and/or photo URL.
|
|
354
|
+
*/
|
|
355
|
+
export declare function updateProfile(user: User, profile: {
|
|
356
|
+
displayName?: string | null;
|
|
357
|
+
photoURL?: string | null;
|
|
358
|
+
}): Promise<void>;
|
|
359
|
+
/**
|
|
360
|
+
* Sends a verification email to the new address before updating the user's email.
|
|
361
|
+
*/
|
|
362
|
+
export declare function verifyBeforeUpdateEmail(user: User, newEmail: string, actionCodeSettings?: ActionCodeSettings | null): Promise<void>;
|
|
363
|
+
/**
|
|
364
|
+
* Returns additional OAuth / federated sign-in information from a {@link UserCredential}.
|
|
365
|
+
*
|
|
366
|
+
* @remarks Returns firebase-js-sdk core fields plus any extra native keys copied from the bridge.
|
|
367
|
+
*/
|
|
368
|
+
export declare function getAdditionalUserInfo(userCredential: UserCredential): AdditionalUserInfo | null;
|
|
369
|
+
/**
|
|
370
|
+
* Returns the configured custom auth domain for the Auth instance.
|
|
371
|
+
*
|
|
372
|
+
* @remarks React Native Firebase-specific helper with no firebase-js-sdk modular equivalent.
|
|
373
|
+
* Reads the custom domain configured for the Firebase project through the native Auth SDK.
|
|
374
|
+
*/
|
|
375
|
+
export declare function getCustomAuthDomain(auth: Auth): Promise<string>;
|
|
376
|
+
/**
|
|
377
|
+
* Validates a password against the project's password policy.
|
|
378
|
+
*/
|
|
379
|
+
export declare function validatePassword(auth: Auth, password: string): Promise<PasswordValidationStatus>;
|
|
380
|
+
export declare const SDK_VERSION: string;
|
|
8
381
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/index.ts"],"names":[],"mappings":"AAiBA,mBAAmB,cAAc,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,mBAAmB,GACpB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/index.ts"],"names":[],"mappings":"AAiBA;;;;;;;;GAQG;AAEH,OAAO,kBAAkB,CAAC;AAE1B,mBAAmB,cAAc,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,mBAAmB,GACpB,MAAM,eAAe,CAAC;AAmBvB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,yBAAyB,MAAM,6BAA6B,CAAC;AACpE,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAK1C,OAAO,iBAAiB,MAAM,+BAA+B,CAAC;AAC9D,OAAO,iBAAiB,MAAM,+BAA+B,CAAC;AAC9D,OAAO,oBAAoB,MAAM,kCAAkC,CAAC;AACpE,OAAO,kBAAkB,MAAM,gCAAgC,CAAC;AAChE,OAAO,kBAAkB,MAAM,gCAAgC,CAAC;AAChE,OAAO,aAAa,MAAM,2BAA2B,CAAC;AACtD,OAAO,gBAAgB,MAAM,8BAA8B,CAAC;AAC5D,OAAO,iBAAiB,MAAM,+BAA+B,CAAC;AAC9D,OAAO,mBAAmB,MAAM,iCAAiC,C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AAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGvE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAG7E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAG5F;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GACjE,OAAO,CAAC,IAAI,CAAC,CAMf;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,MAAM,EAChB,kBAAkB,CAAC,EAAE,kBAAkB,GAAG,IAAI,GAC7C,OAAO,CAAC,IAAI,CAAC,CAQf;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,cAAc,EAAE,cAAc,GAAG,kBAAkB,GAAG,IAAI,CAW/F;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAG/D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAmBhG;AAED,eAAO,MAAM,WAAW,EAAE,MAAgB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts sync native TurboModule throws into {@link NativeFirebaseError} using the same
|
|
3
|
+
* {@code code}/{@code message} shape as promise rejects.
|
|
4
|
+
*/
|
|
5
|
+
export declare function rethrowAuthSyncNativeError(error: unknown): never;
|
|
6
|
+
//# sourceMappingURL=syncNativeError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syncNativeError.d.ts","sourceRoot":"","sources":["../../../../lib/internal/syncNativeError.ts"],"names":[],"mappings":"AAqDA;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,CA+BhE"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import type { MultiFactorAssertion as ModularMultiFactorAssertion } from './types/auth';
|
|
2
|
-
import type {
|
|
1
|
+
import type { MultiFactorAssertion as ModularMultiFactorAssertion, User } from './types/auth';
|
|
2
|
+
import type { MultiFactorInfo, MultiFactorSession, MultiFactorUser as MultiFactorUserType, MultiFactorAssertion } from './types/auth';
|
|
3
3
|
import type { AuthInternal } from './types/internal';
|
|
4
4
|
type MultiFactorAuthHost = {
|
|
5
|
-
currentUser:
|
|
5
|
+
currentUser: User | null;
|
|
6
6
|
native: AuthInternal['native'];
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* Return a MultiFactorUser instance the gateway to multi-factor operations.
|
|
10
10
|
*/
|
|
11
|
-
export declare function multiFactor(auth: MultiFactorAuthHost):
|
|
11
|
+
export declare function multiFactor(auth: MultiFactorAuthHost): MultiFactorUserType;
|
|
12
12
|
export declare class MultiFactorUser {
|
|
13
|
-
readonly enrolledFactors:
|
|
13
|
+
readonly enrolledFactors: MultiFactorInfo[];
|
|
14
14
|
private readonly _auth;
|
|
15
|
-
constructor(auth: MultiFactorAuthHost, user?:
|
|
16
|
-
getSession(): Promise<
|
|
15
|
+
constructor(auth: MultiFactorAuthHost, user?: User);
|
|
16
|
+
getSession(): Promise<MultiFactorSession>;
|
|
17
17
|
/**
|
|
18
18
|
* Finalize the enrollment process for the given multi-factor assertion.
|
|
19
19
|
* Optionally set a displayName. This method will reload the current user
|
|
20
20
|
* profile, which is necessary to see the multi-factor changes.
|
|
21
21
|
*/
|
|
22
|
-
enroll(multiFactorAssertion:
|
|
23
|
-
unenroll(enrollmentId:
|
|
22
|
+
enroll(multiFactorAssertion: MultiFactorAssertion | ModularMultiFactorAssertion, displayName?: string | null): Promise<void>;
|
|
23
|
+
unenroll(enrollmentId: MultiFactorInfo | string): Promise<void>;
|
|
24
24
|
}
|
|
25
25
|
export {};
|
|
26
26
|
//# sourceMappingURL=multiFactor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiFactor.d.ts","sourceRoot":"","sources":["../../../lib/multiFactor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"multiFactor.d.ts","sourceRoot":"","sources":["../../../lib/multiFactor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,IAAI,2BAA2B,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC9F,OAAO,KAAK,EACV,eAAe,EACf,kBAAkB,EAClB,eAAe,IAAI,mBAAmB,EACtC,oBAAoB,EACrB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,YAAY,EAGb,MAAM,kBAAkB,CAAC;AAE1B,KAAK,mBAAmB,GAAG;IACzB,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;CAChC,CAAC;AACF;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,mBAAmB,GAAG,mBAAmB,CAE1E;AAED,qBAAa,eAAe;IAC1B,QAAQ,CAAC,eAAe,EAAE,eAAe,EAAE,CAAC;IAC5C,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsB;gBAEhC,IAAI,EAAE,mBAAmB,EAAE,IAAI,CAAC,EAAE,IAAI;IAalD,UAAU,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAIzC;;;;OAIG;IACG,MAAM,CACV,oBAAoB,EAAE,oBAAoB,GAAG,2BAA2B,EACxE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAC1B,OAAO,CAAC,IAAI,CAAC;IA4BV,QAAQ,CAAC,YAAY,EAAE,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAOtE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OIDCAuthProvider.d.ts","sourceRoot":"","sources":["../../../../lib/providers/OIDCAuthProvider.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAI1E;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAgB;;IAKnC,MAAM,KAAK,WAAW,YAErB;IAED,MAAM,CAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"OIDCAuthProvider.d.ts","sourceRoot":"","sources":["../../../../lib/providers/OIDCAuthProvider.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,cAAc,IAAI,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAI1E;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAgB;;IAKnC,MAAM,KAAK,WAAW,YAErB;IAED,MAAM,CAAC,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,kBAAkB;CAIjG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PhoneAuthProvider.d.ts","sourceRoot":"","sources":["../../../../lib/providers/PhoneAuthProvider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PhoneAuthProvider.d.ts","sourceRoot":"","sources":["../../../../lib/providers/PhoneAuthProvider.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EACV,mBAAmB,EACnB,IAAI,EACJ,SAAS,EAET,mBAAmB,EAEnB,gBAAgB,EAChB,iCAAiC,EACjC,iCAAiC,EAEjC,cAAc,EACf,MAAM,eAAe,CAAC;AAGvB,KAAK,aAAa,GAAG,SAAS,CAAC;AA+C/B,MAAM,CAAC,OAAO,OAAO,iBAAiB;IACpC,MAAM,CAAC,QAAQ,CAAC,oBAAoB,EAAE,OAAO,CAAc;IAC3D,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAc;IAElD,QAAQ,CAAC,UAAU,UAAc;IAEjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAwB;gBAElC,IAAI,EAAE,IAAI;IAOtB,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,mBAAmB;IAI5E,MAAM,CAAC,oBAAoB,CAAC,eAAe,EAAE,cAAc,GAAG,mBAAmB,GAAG,IAAI;IAIxF,MAAM,CAAC,mBAAmB,CAAC,MAAM,EAAE,aAAa,GAAG,mBAAmB,GAAG,IAAI;IAI7E,iBAAiB,CACf,gBAAgB,EAAE,gBAAgB,GAAG,MAAM,EAC3C,WAAW,EAAE,mBAAmB,GAC/B,OAAO,CAAC,MAAM,CAAC;IAClB,iBAAiB,CACf,gBAAgB,EAAE,iCAAiC,GAAG,iCAAiC,GACtF,OAAO,CAAC,MAAM,CAAC;CAiCnB"}
|
|
@@ -211,6 +211,8 @@ export interface User extends UserInfo {
|
|
|
211
211
|
readonly providerData: UserInfo[];
|
|
212
212
|
readonly refreshToken: string;
|
|
213
213
|
readonly tenantId: string | null;
|
|
214
|
+
/** Present on native user instances returned from auth state listeners. */
|
|
215
|
+
readonly multiFactor?: MultiFactor | null;
|
|
214
216
|
delete(): Promise<void>;
|
|
215
217
|
getIdToken(forceRefresh?: boolean): Promise<string>;
|
|
216
218
|
getIdTokenResult(forceRefresh?: boolean): Promise<IdTokenResult>;
|
|
@@ -302,4 +304,15 @@ export interface TotpMultiFactorAssertion extends MultiFactorAssertion {
|
|
|
302
304
|
}
|
|
303
305
|
export interface TotpMultiFactorInfo extends MultiFactorInfo {
|
|
304
306
|
}
|
|
307
|
+
export type AuthListenerCallback = (user: User | null) => void;
|
|
308
|
+
export type CallbackOrObserver<T extends (...args: any[]) => any> = T | {
|
|
309
|
+
next: T;
|
|
310
|
+
};
|
|
311
|
+
export interface UpdateProfile {
|
|
312
|
+
displayName?: string | null;
|
|
313
|
+
photoURL?: string | null;
|
|
314
|
+
}
|
|
315
|
+
export interface MultiFactor {
|
|
316
|
+
enrolledFactors: MultiFactorInfo[];
|
|
317
|
+
}
|
|
305
318
|
//# sourceMappingURL=auth.d.ts.map
|