@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.
Files changed (132) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/RNFBAuth.podspec +16 -7
  3. package/android/build.gradle +23 -0
  4. package/android/src/main/java/io/invertase/firebase/auth/{ReactNativeFirebaseAuthModule.java → NativeRNFBTurboAuth.java} +131 -103
  5. package/android/src/main/java/io/invertase/firebase/auth/ReactNativeFirebaseAuthPackage.java +1 -1
  6. package/android/src/main/java/io/invertase/firebase/auth/ReactNativeFirebaseAuthSyncException.java +35 -0
  7. package/android/src/main/java/io/invertase/firebase/auth/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboAuthSpec.java +308 -0
  8. package/android/src/main/java/io/invertase/firebase/auth/generated/jni/CMakeLists.txt +36 -0
  9. package/android/src/main/java/io/invertase/firebase/auth/generated/jni/RNFBAuthTurboModules-generated.cpp +392 -0
  10. package/android/src/main/java/io/invertase/firebase/auth/generated/jni/RNFBAuthTurboModules.h +31 -0
  11. package/android/src/main/java/io/invertase/firebase/auth/generated/jni/react/renderer/components/RNFBAuthTurboModules/RNFBAuthTurboModulesJSI-generated.cpp +539 -0
  12. package/android/src/main/java/io/invertase/firebase/auth/generated/jni/react/renderer/components/RNFBAuthTurboModules/RNFBAuthTurboModulesJSI.h +611 -0
  13. package/app.plugin.js +1 -1
  14. package/dist/module/ConfirmationResult.js.map +1 -1
  15. package/dist/module/MultiFactorResolver.js.map +1 -1
  16. package/dist/module/PhoneAuthListener.js +3 -4
  17. package/dist/module/PhoneAuthListener.js.map +1 -1
  18. package/dist/module/TotpMultiFactorGenerator.js +1 -1
  19. package/dist/module/TotpMultiFactorGenerator.js.map +1 -1
  20. package/dist/module/TotpSecret.js +15 -9
  21. package/dist/module/TotpSecret.js.map +1 -1
  22. package/dist/module/User.js +1 -1
  23. package/dist/module/User.js.map +1 -1
  24. package/dist/module/credentials/OAuthCredential.js +22 -1
  25. package/dist/module/credentials/OAuthCredential.js.map +1 -1
  26. package/dist/module/getMultiFactorResolver.js +2 -2
  27. package/dist/module/getMultiFactorResolver.js.map +1 -1
  28. package/dist/module/index.js +1226 -6
  29. package/dist/module/index.js.map +1 -1
  30. package/dist/module/internal/syncNativeError.js +75 -0
  31. package/dist/module/internal/syncNativeError.js.map +1 -0
  32. package/dist/module/multiFactor.js +5 -3
  33. package/dist/module/multiFactor.js.map +1 -1
  34. package/dist/module/providers/AppleAuthProvider.js +17 -4
  35. package/dist/module/providers/AppleAuthProvider.js.map +1 -1
  36. package/dist/module/providers/OAuthProvider.js +4 -2
  37. package/dist/module/providers/OAuthProvider.js.map +1 -1
  38. package/dist/module/providers/PhoneAuthProvider.js +4 -4
  39. package/dist/module/providers/PhoneAuthProvider.js.map +1 -1
  40. package/dist/module/types/auth.js +8 -0
  41. package/dist/module/types/auth.js.map +1 -1
  42. package/dist/module/version.js +1 -1
  43. package/dist/module/web/RNFBAuthModule.js +26 -18
  44. package/dist/module/web/RNFBAuthModule.js.map +1 -1
  45. package/dist/typescript/lib/ConfirmationResult.d.ts +2 -2
  46. package/dist/typescript/lib/ConfirmationResult.d.ts.map +1 -1
  47. package/dist/typescript/lib/MultiFactorResolver.d.ts +6 -6
  48. package/dist/typescript/lib/MultiFactorResolver.d.ts.map +1 -1
  49. package/dist/typescript/lib/PhoneAuthListener.d.ts +1 -4
  50. package/dist/typescript/lib/PhoneAuthListener.d.ts.map +1 -1
  51. package/dist/typescript/lib/TotpSecret.d.ts +2 -4
  52. package/dist/typescript/lib/TotpSecret.d.ts.map +1 -1
  53. package/dist/typescript/lib/User.d.ts +13 -13
  54. package/dist/typescript/lib/User.d.ts.map +1 -1
  55. package/dist/typescript/lib/credentials/OAuthCredential.d.ts +6 -0
  56. package/dist/typescript/lib/credentials/OAuthCredential.d.ts.map +1 -1
  57. package/dist/typescript/lib/getMultiFactorResolver.d.ts +5 -5
  58. package/dist/typescript/lib/getMultiFactorResolver.d.ts.map +1 -1
  59. package/dist/typescript/lib/index.d.ts +377 -4
  60. package/dist/typescript/lib/index.d.ts.map +1 -1
  61. package/dist/typescript/lib/internal/syncNativeError.d.ts +6 -0
  62. package/dist/typescript/lib/internal/syncNativeError.d.ts.map +1 -0
  63. package/dist/typescript/lib/multiFactor.d.ts +9 -9
  64. package/dist/typescript/lib/multiFactor.d.ts.map +1 -1
  65. package/dist/typescript/lib/providers/AppleAuthProvider.d.ts +10 -3
  66. package/dist/typescript/lib/providers/AppleAuthProvider.d.ts.map +1 -1
  67. package/dist/typescript/lib/providers/OAuthProvider.d.ts.map +1 -1
  68. package/dist/typescript/lib/providers/PhoneAuthProvider.d.ts.map +1 -1
  69. package/dist/typescript/lib/types/auth.d.ts +39 -0
  70. package/dist/typescript/lib/types/auth.d.ts.map +1 -1
  71. package/dist/typescript/lib/types/internal.d.ts +45 -48
  72. package/dist/typescript/lib/types/internal.d.ts.map +1 -1
  73. package/dist/typescript/lib/version.d.ts +1 -1
  74. package/dist/typescript/lib/web/RNFBAuthModule.d.ts +7 -5
  75. package/dist/typescript/lib/web/RNFBAuthModule.d.ts.map +1 -1
  76. package/ios/RNFBAuth/RNFBAuthHelper.h +338 -0
  77. package/ios/RNFBAuth/{RNFBAuthModule.m → RNFBAuthHelper.m} +605 -323
  78. package/ios/RNFBAuth/RNFBAuthModule.h +9 -66
  79. package/ios/RNFBAuth/RNFBAuthModule.mm +592 -0
  80. package/ios/RNFBAuth.xcodeproj/project.pbxproj +8 -8
  81. package/ios/generated/RCTAppDependencyProvider.h +25 -0
  82. package/ios/generated/RCTAppDependencyProvider.mm +55 -0
  83. package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  84. package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  85. package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
  86. package/ios/generated/RCTThirdPartyComponentsProvider.mm +23 -0
  87. package/ios/generated/RNFBAuthTurboModules/RNFBAuthTurboModules-generated.mm +459 -0
  88. package/ios/generated/RNFBAuthTurboModules/RNFBAuthTurboModules.h +342 -0
  89. package/ios/generated/RNFBAuthTurboModulesJSI-generated.cpp +539 -0
  90. package/ios/generated/RNFBAuthTurboModulesJSI.h +611 -0
  91. package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
  92. package/lib/ConfirmationResult.ts +3 -6
  93. package/lib/MultiFactorResolver.ts +8 -8
  94. package/lib/PhoneAuthListener.ts +6 -10
  95. package/lib/TotpMultiFactorGenerator.ts +1 -1
  96. package/lib/TotpSecret.ts +22 -9
  97. package/lib/User.ts +27 -38
  98. package/lib/credentials/OAuthCredential.ts +44 -0
  99. package/lib/getMultiFactorResolver.ts +9 -11
  100. package/lib/index.ts +1848 -6
  101. package/lib/internal/syncNativeError.ts +89 -0
  102. package/lib/multiFactor.ts +25 -16
  103. package/lib/providers/AppleAuthProvider.ts +21 -5
  104. package/lib/providers/OAuthProvider.ts +2 -0
  105. package/lib/providers/PhoneAuthProvider.ts +9 -22
  106. package/lib/types/auth.ts +42 -0
  107. package/lib/types/internal.ts +56 -63
  108. package/lib/version.ts +1 -1
  109. package/lib/web/RNFBAuthModule.ts +47 -33
  110. package/package.json +30 -5
  111. package/plugin/build/app.plugin.d.ts +2 -0
  112. package/plugin/build/app.plugin.js +6 -0
  113. package/plugin/src/app.plugin.ts +3 -0
  114. package/plugin/tsconfig.tsbuildinfo +1 -1
  115. package/react-native.config.js +9 -0
  116. package/specs/NativeRNFBTurboAuth.ts +145 -0
  117. package/typedoc.json +0 -1
  118. package/dist/module/modular.js +0 -793
  119. package/dist/module/modular.js.map +0 -1
  120. package/dist/module/namespaced.js +0 -522
  121. package/dist/module/namespaced.js.map +0 -1
  122. package/dist/module/types/namespaced.js +0 -62
  123. package/dist/module/types/namespaced.js.map +0 -1
  124. package/dist/typescript/lib/modular.d.ts +0 -370
  125. package/dist/typescript/lib/modular.d.ts.map +0 -1
  126. package/dist/typescript/lib/namespaced.d.ts +0 -12
  127. package/dist/typescript/lib/namespaced.d.ts.map +0 -1
  128. package/dist/typescript/lib/types/namespaced.d.ts +0 -2185
  129. package/dist/typescript/lib/types/namespaced.d.ts.map +0 -1
  130. package/lib/modular.ts +0 -1166
  131. package/lib/namespaced.ts +0 -849
  132. 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
- // Non-web platforms pull the react-native export from package.json and
355
- // get a bundle that defines `getReactNativePersistence` etc, but web platforms
356
- // do *not* have that method defined. So we only call it for non-web platforms
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 {Promise<boolean>} - Whether the link is a valid sign in with email link.
581
+ * @returns {boolean} - Whether the link is a valid sign in with email link.
587
582
  */
588
- async isSignInWithEmailLink(appName: string, emailLink: string) {
589
- return guard(async () => {
583
+ isSignInWithEmailLink(appName: string, emailLink: string) {
584
+ try {
590
585
  const auth = getCachedAuthInstance(appName);
591
- return await isSignInWithEmailLink(auth, emailLink);
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 delete(appName: string) {
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
- return rejectPromiseWithCodeAndMessage(
1258
- 'invalid-multi-factor-secret',
1259
- "can't find secret for provided key",
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": "25.1.0",
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": "25.1.0",
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.js": "./app.plugin.js",
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": "e0a565d8a73a9b103d140ffacfb8876b30d8bdc5"
104
+ "gitHead": "59d053eca14ab8aa80e5ac76887014925c67e52b"
80
105
  }
@@ -0,0 +1,2 @@
1
+ import plugin from './index';
2
+ export = plugin;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ const index_1 = __importDefault(require("./index"));
6
+ module.exports = index_1.default;
@@ -0,0 +1,3 @@
1
+ import plugin from './index';
2
+
3
+ export = plugin;
@@ -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,9 @@
1
+ module.exports = {
2
+ dependency: {
3
+ platforms: {
4
+ android: {
5
+ cmakeListsPath: './src/main/java/io/invertase/firebase/auth/generated/jni/CMakeLists.txt',
6
+ },
7
+ },
8
+ },
9
+ };
@@ -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');
package/typedoc.json CHANGED
@@ -4,7 +4,6 @@
4
4
  "tsconfig": "tsconfig.json",
5
5
  "excludeInternal": true,
6
6
  "intentionallyNotExported": [
7
- "AuthNamespace",
8
7
  "Observer",
9
8
  "AuthInternal",
10
9
  "OAuthCredentialParams"