@react-native-firebase/auth 25.1.0 → 26.1.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 +35 -0
- package/RNFBAuth.podspec +16 -7
- package/android/build.gradle +23 -0
- package/android/src/main/java/io/invertase/firebase/auth/{ReactNativeFirebaseAuthModule.java → NativeRNFBTurboAuth.java} +131 -103
- 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 +539 -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/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/OAuthCredential.js +22 -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 +1226 -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/AppleAuthProvider.js +17 -4
- package/dist/module/providers/AppleAuthProvider.js.map +1 -1
- package/dist/module/providers/OAuthProvider.js +4 -2
- package/dist/module/providers/OAuthProvider.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 +8 -0
- package/dist/module/types/auth.js.map +1 -1
- package/dist/module/version.js +1 -1
- package/dist/module/web/RNFBAuthModule.js +26 -18
- package/dist/module/web/RNFBAuthModule.js.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/OAuthCredential.d.ts +6 -0
- 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/AppleAuthProvider.d.ts +10 -3
- package/dist/typescript/lib/providers/AppleAuthProvider.d.ts.map +1 -1
- package/dist/typescript/lib/providers/OAuthProvider.d.ts.map +1 -1
- package/dist/typescript/lib/providers/PhoneAuthProvider.d.ts.map +1 -1
- package/dist/typescript/lib/types/auth.d.ts +39 -0
- package/dist/typescript/lib/types/auth.d.ts.map +1 -1
- package/dist/typescript/lib/types/internal.d.ts +45 -48
- 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 +7 -5
- package/dist/typescript/lib/web/RNFBAuthModule.d.ts.map +1 -1
- package/ios/RNFBAuth/RNFBAuthHelper.h +338 -0
- package/ios/RNFBAuth/{RNFBAuthModule.m → RNFBAuthHelper.m} +605 -323
- package/ios/RNFBAuth/RNFBAuthModule.h +9 -66
- package/ios/RNFBAuth/RNFBAuthModule.mm +592 -0
- 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 +342 -0
- package/ios/generated/RNFBAuthTurboModulesJSI-generated.cpp +539 -0
- package/ios/generated/RNFBAuthTurboModulesJSI.h +611 -0
- package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
- 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 +27 -38
- package/lib/credentials/OAuthCredential.ts +44 -0
- package/lib/getMultiFactorResolver.ts +9 -11
- package/lib/index.ts +1848 -6
- package/lib/internal/syncNativeError.ts +89 -0
- package/lib/multiFactor.ts +25 -16
- package/lib/providers/AppleAuthProvider.ts +21 -5
- package/lib/providers/OAuthProvider.ts +2 -0
- package/lib/providers/PhoneAuthProvider.ts +9 -22
- package/lib/types/auth.ts +42 -0
- package/lib/types/internal.ts +56 -63
- package/lib/version.ts +1 -1
- package/lib/web/RNFBAuthModule.ts +47 -33
- package/package.json +30 -5
- 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 +145 -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 -1166
- package/lib/namespaced.ts +0 -849
- package/lib/types/namespaced.ts +0 -2350
|
@@ -327,33 +327,28 @@ const sessionMap = new Map<string, MultiFactorSession>();
|
|
|
327
327
|
const totpSecretMap = new Map<string, WebTotpSecret>();
|
|
328
328
|
let sessionId = 0;
|
|
329
329
|
|
|
330
|
-
// Returns a cached Firestore instance.
|
|
331
330
|
function getCachedAuthInstance(appName: string): Auth {
|
|
332
331
|
if (!instances[appName]) {
|
|
333
|
-
if (isMemoryStorage()) {
|
|
334
|
-
// Warn auth persistence is is disabled unless Async Storage implementation is provided.
|
|
335
|
-
// eslint-disable-next-line no-console
|
|
336
|
-
console.warn(
|
|
337
|
-
'Firebase Auth persistence is disabled. To enable persistence, provide an Async Storage implementation.\n' +
|
|
338
|
-
'\n' +
|
|
339
|
-
'For example, to use React Native Async Storage:\n' +
|
|
340
|
-
'\n' +
|
|
341
|
-
" import AsyncStorage from '@react-native-async-storage/async-storage';\n" +
|
|
342
|
-
'\n' +
|
|
343
|
-
' // Before initializing Firebase set the Async Storage implementation\n' +
|
|
344
|
-
' // that will be used to persist user sessions.\n' +
|
|
345
|
-
' firebase.setReactNativeAsyncStorage(AsyncStorage);\n' +
|
|
346
|
-
'\n' +
|
|
347
|
-
' // Then initialize Firebase as normal.\n' +
|
|
348
|
-
' await firebase.initializeApp({ ... });\n',
|
|
349
|
-
);
|
|
350
|
-
}
|
|
351
|
-
|
|
352
332
|
const authOptions: { persistence?: unknown } = {};
|
|
333
|
+
|
|
353
334
|
if (Platform.OS !== 'web') {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
335
|
+
if (isMemoryStorage()) {
|
|
336
|
+
// eslint-disable-next-line no-console
|
|
337
|
+
console.warn(
|
|
338
|
+
'Firebase Auth persistence is disabled. To enable persistence, provide an Async Storage implementation.\n' +
|
|
339
|
+
'\n' +
|
|
340
|
+
'For example, to use React Native Async Storage:\n' +
|
|
341
|
+
'\n' +
|
|
342
|
+
" import AsyncStorage from '@react-native-async-storage/async-storage';\n" +
|
|
343
|
+
'\n' +
|
|
344
|
+
' // Before initializing Firebase set the Async Storage implementation\n' +
|
|
345
|
+
' // that will be used to persist user sessions.\n' +
|
|
346
|
+
' firebase.setReactNativeAsyncStorage(AsyncStorage);\n' +
|
|
347
|
+
'\n' +
|
|
348
|
+
' // Then initialize Firebase as normal.\n' +
|
|
349
|
+
' await firebase.initializeApp({ ... });\n',
|
|
350
|
+
);
|
|
351
|
+
}
|
|
357
352
|
authOptions.persistence = getReactNativePersistence(getReactNativeAsyncStorageInternal());
|
|
358
353
|
}
|
|
359
354
|
|
|
@@ -583,13 +578,15 @@ export default {
|
|
|
583
578
|
* Check if a sign in with email link is valid
|
|
584
579
|
* @param {string} appName - The name of the app to get the auth instance for.
|
|
585
580
|
* @param {string} emailLink - The email link to sign in with.
|
|
586
|
-
* @returns {
|
|
581
|
+
* @returns {boolean} - Whether the link is a valid sign in with email link.
|
|
587
582
|
*/
|
|
588
|
-
|
|
589
|
-
|
|
583
|
+
isSignInWithEmailLink(appName: string, emailLink: string) {
|
|
584
|
+
try {
|
|
590
585
|
const auth = getCachedAuthInstance(appName);
|
|
591
|
-
return
|
|
592
|
-
})
|
|
586
|
+
return isSignInWithEmailLink(auth, emailLink);
|
|
587
|
+
} catch (e) {
|
|
588
|
+
throw getWebError(e as Error & { code?: string });
|
|
589
|
+
}
|
|
593
590
|
},
|
|
594
591
|
|
|
595
592
|
/**
|
|
@@ -667,7 +664,7 @@ export default {
|
|
|
667
664
|
* @param {string} appName - The name of the app to get the auth instance for.
|
|
668
665
|
* @returns {Promise<null>}
|
|
669
666
|
*/
|
|
670
|
-
async
|
|
667
|
+
async deleteUser(appName: string) {
|
|
671
668
|
return guard(async () => {
|
|
672
669
|
const auth = getCachedAuthInstance(appName);
|
|
673
670
|
|
|
@@ -861,6 +858,8 @@ export default {
|
|
|
861
858
|
provider: string,
|
|
862
859
|
authToken: string,
|
|
863
860
|
authSecret?: string | null,
|
|
861
|
+
// Sign in with Apple full name: unsupported by firebase-js-sdk's OAuthCredential, ignored on web.
|
|
862
|
+
_fullName?: object | null,
|
|
864
863
|
) {
|
|
865
864
|
return guard(async () => {
|
|
866
865
|
const auth = getCachedAuthInstance(appName);
|
|
@@ -916,6 +915,13 @@ export default {
|
|
|
916
915
|
});
|
|
917
916
|
},
|
|
918
917
|
|
|
918
|
+
verifyPhoneNumberWithMultiFactorInfo() {
|
|
919
|
+
return rejectPromiseWithCodeAndMessage(
|
|
920
|
+
'unsupported',
|
|
921
|
+
'This operation is not supported in this environment.',
|
|
922
|
+
);
|
|
923
|
+
},
|
|
924
|
+
|
|
919
925
|
verifyPhoneNumberForMultiFactor() {
|
|
920
926
|
return rejectPromiseWithCodeAndMessage(
|
|
921
927
|
'unsupported',
|
|
@@ -937,6 +943,13 @@ export default {
|
|
|
937
943
|
);
|
|
938
944
|
},
|
|
939
945
|
|
|
946
|
+
resolveTotpSignIn() {
|
|
947
|
+
return rejectPromiseWithCodeAndMessage(
|
|
948
|
+
'unsupported',
|
|
949
|
+
'This operation is not supported in this environment.',
|
|
950
|
+
);
|
|
951
|
+
},
|
|
952
|
+
|
|
940
953
|
confirmationResultConfirm() {
|
|
941
954
|
return rejectPromiseWithCodeAndMessage(
|
|
942
955
|
'unsupported',
|
|
@@ -1254,10 +1267,11 @@ export default {
|
|
|
1254
1267
|
generateQrCodeUrl(_appName: string, secretKey: string, accountName?: string, issuer?: string) {
|
|
1255
1268
|
const totpSecret = totpSecretMap.get(secretKey);
|
|
1256
1269
|
if (!totpSecret) {
|
|
1257
|
-
|
|
1258
|
-
'
|
|
1259
|
-
|
|
1260
|
-
|
|
1270
|
+
throw getWebError({
|
|
1271
|
+
name: 'FirebaseError',
|
|
1272
|
+
code: 'auth/invalid-multi-factor-secret',
|
|
1273
|
+
message: "can't find secret for provided key",
|
|
1274
|
+
});
|
|
1261
1275
|
}
|
|
1262
1276
|
return totpSecret.generateQrCodeUrl(accountName, issuer);
|
|
1263
1277
|
},
|
package/package.json
CHANGED
|
@@ -1,17 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-firebase/auth",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "26.1.0",
|
|
4
4
|
"author": "Invertase <oss@invertase.io> (http://invertase.io)",
|
|
5
5
|
"description": "React Native Firebase - The authentication module provides an easy-to-use API to integrate an authentication workflow into new and existing applications. React Native Firebase provides access to all Firebase authentication methods and identity providers.",
|
|
6
6
|
"main": "./dist/module/index.js",
|
|
7
7
|
"types": "./dist/typescript/lib/index.d.ts",
|
|
8
|
+
"codegenConfig": {
|
|
9
|
+
"name": "RNFBAuthTurboModules",
|
|
10
|
+
"type": "modules",
|
|
11
|
+
"jsSrcsDir": "specs",
|
|
12
|
+
"includesGeneratedCode": true,
|
|
13
|
+
"android": {
|
|
14
|
+
"javaPackageName": "io.invertase.firebase.auth"
|
|
15
|
+
},
|
|
16
|
+
"ios": {
|
|
17
|
+
"modulesProvider": {
|
|
18
|
+
"NativeRNFBTurboAuth": "RNFBAuthModule"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
8
22
|
"scripts": {
|
|
9
23
|
"build": "genversion --esm --semi lib/version.ts",
|
|
10
24
|
"build:clean": "rimraf android/build && rimraf ios/build",
|
|
11
25
|
"build:plugin": "rimraf plugin/build && tsc --build plugin",
|
|
12
26
|
"compile": "bob build",
|
|
13
27
|
"lint:plugin": "eslint plugin/src/*",
|
|
14
|
-
"prepare": "yarn run build && yarn compile && yarn run build:plugin"
|
|
28
|
+
"prepare": "yarn run build && yarn compile && yarn run build:plugin",
|
|
29
|
+
"codegen": "yarn android:codegen && yarn ios:codegen",
|
|
30
|
+
"android:codegen": "npx @react-native-community/cli codegen --platform android --outputPath=./android/src/main/java/io/invertase/firebase/auth/generated",
|
|
31
|
+
"ios:codegen": "npx @react-native-community/cli codegen --platform ios --outputPath=./ios/generated"
|
|
15
32
|
},
|
|
16
33
|
"repository": {
|
|
17
34
|
"type": "git",
|
|
@@ -28,10 +45,11 @@
|
|
|
28
45
|
"plist": "^3.1.1"
|
|
29
46
|
},
|
|
30
47
|
"peerDependencies": {
|
|
31
|
-
"@react-native-firebase/app": "
|
|
48
|
+
"@react-native-firebase/app": "26.1.0",
|
|
32
49
|
"expo": ">=47.0.0"
|
|
33
50
|
},
|
|
34
51
|
"devDependencies": {
|
|
52
|
+
"@react-native-firebase/app": "26.1.0",
|
|
35
53
|
"@types/plist": "^3.0.5",
|
|
36
54
|
"expo": "^55.0.18",
|
|
37
55
|
"react-native-builder-bob": "^0.40.13"
|
|
@@ -51,7 +69,14 @@
|
|
|
51
69
|
"types": "./dist/typescript/lib/index.d.ts",
|
|
52
70
|
"default": "./dist/module/index.js"
|
|
53
71
|
},
|
|
54
|
-
"./app.plugin
|
|
72
|
+
"./app.plugin": {
|
|
73
|
+
"types": "./plugin/build/app.plugin.d.ts",
|
|
74
|
+
"default": "./app.plugin.js"
|
|
75
|
+
},
|
|
76
|
+
"./app.plugin.js": {
|
|
77
|
+
"types": "./plugin/build/app.plugin.d.ts",
|
|
78
|
+
"default": "./app.plugin.js"
|
|
79
|
+
},
|
|
55
80
|
"./package.json": "./package.json"
|
|
56
81
|
},
|
|
57
82
|
"react-native-builder-bob": {
|
|
@@ -76,5 +101,5 @@
|
|
|
76
101
|
"node_modules/",
|
|
77
102
|
"dist/"
|
|
78
103
|
],
|
|
79
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "59d053eca14ab8aa80e5ac76887014925c67e52b"
|
|
80
105
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["./src/index.ts","./src/pluginConfig.ts","./src/ios/index.ts","./src/ios/openUrlFix.ts","./src/ios/urlTypes.ts"],"version":"6.0.3"}
|
|
1
|
+
{"root":["./src/app.plugin.ts","./src/index.ts","./src/pluginConfig.ts","./src/ios/index.ts","./src/ios/openUrlFix.ts","./src/ios/urlTypes.ts"],"version":"6.0.3"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-wrapper-object-types */
|
|
2
|
+
import type { TurboModule } from 'react-native';
|
|
3
|
+
import { TurboModuleRegistry } from 'react-native';
|
|
4
|
+
|
|
5
|
+
export interface Spec extends TurboModule {
|
|
6
|
+
getConstants(): {
|
|
7
|
+
APP_LANGUAGE: Object;
|
|
8
|
+
APP_USER: Object;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
configureAuthDomain(appName: string): void;
|
|
12
|
+
getCustomAuthDomain(appName: string): Promise<string | null>;
|
|
13
|
+
addAuthStateListener(appName: string): void;
|
|
14
|
+
removeAuthStateListener(appName: string): void;
|
|
15
|
+
addIdTokenListener(appName: string): void;
|
|
16
|
+
removeIdTokenListener(appName: string): void;
|
|
17
|
+
forceRecaptchaFlowForTesting(appName: string, forceRecaptchaFlow: boolean): Promise<void>;
|
|
18
|
+
setAutoRetrievedSmsCodeForPhoneNumber(
|
|
19
|
+
appName: string,
|
|
20
|
+
phoneNumber: string,
|
|
21
|
+
smsCode: string,
|
|
22
|
+
): Promise<void>;
|
|
23
|
+
setAppVerificationDisabledForTesting(appName: string, disabled: boolean): Promise<void>;
|
|
24
|
+
useUserAccessGroup(appName: string, userAccessGroup: string): Promise<void>;
|
|
25
|
+
signOut(appName: string): Promise<void>;
|
|
26
|
+
signInAnonymously(appName: string): Promise<Object>;
|
|
27
|
+
createUserWithEmailAndPassword(appName: string, email: string, password: string): Promise<Object>;
|
|
28
|
+
isSignInWithEmailLink(appName: string, emailLink: string): boolean;
|
|
29
|
+
signInWithEmailAndPassword(appName: string, email: string, password: string): Promise<Object>;
|
|
30
|
+
signInWithEmailLink(appName: string, email: string, emailLink: string): Promise<Object>;
|
|
31
|
+
signInWithCustomToken(appName: string, token: string): Promise<Object>;
|
|
32
|
+
revokeToken(appName: string, authorizationCode: string): Promise<void>;
|
|
33
|
+
sendPasswordResetEmail(
|
|
34
|
+
appName: string,
|
|
35
|
+
email: string,
|
|
36
|
+
actionCodeSettings?: Object | null,
|
|
37
|
+
): Promise<void>;
|
|
38
|
+
sendSignInLinkToEmail(appName: string, email: string, actionCodeSettings: Object): Promise<void>;
|
|
39
|
+
deleteUser(appName: string): Promise<void>;
|
|
40
|
+
reload(appName: string): Promise<Object>;
|
|
41
|
+
sendEmailVerification(appName: string, actionCodeSettings?: Object | null): Promise<Object>;
|
|
42
|
+
verifyBeforeUpdateEmail(
|
|
43
|
+
appName: string,
|
|
44
|
+
email: string,
|
|
45
|
+
actionCodeSettings?: Object | null,
|
|
46
|
+
): Promise<Object>;
|
|
47
|
+
updateEmail(appName: string, email: string): Promise<Object>;
|
|
48
|
+
updatePassword(appName: string, password: string): Promise<Object>;
|
|
49
|
+
updatePhoneNumber(
|
|
50
|
+
appName: string,
|
|
51
|
+
provider: string,
|
|
52
|
+
authToken: string,
|
|
53
|
+
authSecret: string,
|
|
54
|
+
): Promise<Object>;
|
|
55
|
+
updateProfile(appName: string, props: Object): Promise<Object>;
|
|
56
|
+
getIdToken(appName: string, forceRefresh: boolean): Promise<string>;
|
|
57
|
+
getIdTokenResult(appName: string, forceRefresh: boolean): Promise<Object>;
|
|
58
|
+
signInWithCredential(
|
|
59
|
+
appName: string,
|
|
60
|
+
provider: string,
|
|
61
|
+
authToken: string,
|
|
62
|
+
authSecret: string,
|
|
63
|
+
// Sign in with Apple full name (iOS only; see AppleFullPersonName in lib/types/auth.ts).
|
|
64
|
+
fullName?: Object | null,
|
|
65
|
+
): Promise<Object>;
|
|
66
|
+
signInWithProvider(appName: string, provider: Object): Promise<Object>;
|
|
67
|
+
signInWithPhoneNumber(
|
|
68
|
+
appName: string,
|
|
69
|
+
phoneNumber: string,
|
|
70
|
+
forceResend: boolean,
|
|
71
|
+
): Promise<Object>;
|
|
72
|
+
verifyPhoneNumberWithMultiFactorInfo(
|
|
73
|
+
appName: string,
|
|
74
|
+
hintUid: string,
|
|
75
|
+
sessionKey: string,
|
|
76
|
+
): Promise<string>;
|
|
77
|
+
verifyPhoneNumberForMultiFactor(
|
|
78
|
+
appName: string,
|
|
79
|
+
phoneNumber: string,
|
|
80
|
+
sessionKey: string,
|
|
81
|
+
): Promise<string>;
|
|
82
|
+
resolveMultiFactorSignIn(
|
|
83
|
+
appName: string,
|
|
84
|
+
session: string,
|
|
85
|
+
verificationId: string,
|
|
86
|
+
verificationCode: string,
|
|
87
|
+
): Promise<Object>;
|
|
88
|
+
resolveTotpSignIn(
|
|
89
|
+
appName: string,
|
|
90
|
+
sessionKey: string,
|
|
91
|
+
uid: string,
|
|
92
|
+
oneTimePassword: string,
|
|
93
|
+
): Promise<Object>;
|
|
94
|
+
generateTotpSecret(appName: string, sessionKey: string): Promise<Object>;
|
|
95
|
+
generateQrCodeUrl(appName: string, secretKey: string, account: string, issuer: string): string;
|
|
96
|
+
openInOtpApp(appName: string, secretKey: string, qrCodeUri: string): void;
|
|
97
|
+
getSession(appName: string): Promise<string>;
|
|
98
|
+
unenrollMultiFactor(appName: string, factorUID: string): Promise<void>;
|
|
99
|
+
finalizeMultiFactorEnrollment(
|
|
100
|
+
appName: string,
|
|
101
|
+
verificationId: string,
|
|
102
|
+
verificationCode: string,
|
|
103
|
+
displayName?: string | null,
|
|
104
|
+
): Promise<void>;
|
|
105
|
+
finalizeTotpEnrollment(
|
|
106
|
+
appName: string,
|
|
107
|
+
totpSecret: string,
|
|
108
|
+
verificationCode: string,
|
|
109
|
+
displayName?: string | null,
|
|
110
|
+
): Promise<void>;
|
|
111
|
+
confirmationResultConfirm(appName: string, verificationCode: string): Promise<Object>;
|
|
112
|
+
verifyPhoneNumber(
|
|
113
|
+
appName: string,
|
|
114
|
+
phoneNumber: string,
|
|
115
|
+
requestKey: string,
|
|
116
|
+
timeout: number,
|
|
117
|
+
forceResend: boolean,
|
|
118
|
+
): void;
|
|
119
|
+
confirmPasswordReset(appName: string, code: string, newPassword: string): Promise<void>;
|
|
120
|
+
applyActionCode(appName: string, code: string): Promise<Object | null>;
|
|
121
|
+
checkActionCode(appName: string, code: string): Promise<Object>;
|
|
122
|
+
linkWithCredential(
|
|
123
|
+
appName: string,
|
|
124
|
+
provider: string,
|
|
125
|
+
authToken: string,
|
|
126
|
+
authSecret: string,
|
|
127
|
+
): Promise<Object>;
|
|
128
|
+
linkWithProvider(appName: string, provider: Object): Promise<Object>;
|
|
129
|
+
unlink(appName: string, providerId: string): Promise<Object>;
|
|
130
|
+
reauthenticateWithCredential(
|
|
131
|
+
appName: string,
|
|
132
|
+
provider: string,
|
|
133
|
+
authToken: string,
|
|
134
|
+
authSecret: string,
|
|
135
|
+
): Promise<Object>;
|
|
136
|
+
reauthenticateWithProvider(appName: string, provider: Object): Promise<Object>;
|
|
137
|
+
fetchSignInMethodsForEmail(appName: string, email: string): Promise<Array<string>>;
|
|
138
|
+
setLanguageCode(appName: string, code: string | null): void;
|
|
139
|
+
setTenantId(appName: string, tenantId: string | null): Promise<void>;
|
|
140
|
+
useDeviceLanguage(appName: string): void;
|
|
141
|
+
verifyPasswordResetCode(appName: string, code: string): Promise<string>;
|
|
142
|
+
useEmulator(appName: string, host: string, port: number): void;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export default TurboModuleRegistry.getEnforcing<Spec>('NativeRNFBTurboAuth');
|