@react-native-firebase/auth 26.0.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 (51) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/RNFBAuth.podspec +2 -1
  3. package/android/src/main/java/io/invertase/firebase/auth/NativeRNFBTurboAuth.java +9 -1
  4. package/android/src/main/java/io/invertase/firebase/auth/generated/java/com/facebook/fbreact/specs/NativeRNFBTurboAuthSpec.java +1 -1
  5. package/android/src/main/java/io/invertase/firebase/auth/generated/jni/RNFBAuthTurboModules-generated.cpp +2 -2
  6. package/android/src/main/java/io/invertase/firebase/auth/generated/jni/react/renderer/components/RNFBAuthTurboModules/RNFBAuthTurboModulesJSI-generated.cpp +3 -2
  7. package/android/src/main/java/io/invertase/firebase/auth/generated/jni/react/renderer/components/RNFBAuthTurboModules/RNFBAuthTurboModulesJSI.h +5 -5
  8. package/dist/module/credentials/OAuthCredential.js +22 -1
  9. package/dist/module/credentials/OAuthCredential.js.map +1 -1
  10. package/dist/module/index.js +6 -1
  11. package/dist/module/index.js.map +1 -1
  12. package/dist/module/providers/AppleAuthProvider.js +17 -4
  13. package/dist/module/providers/AppleAuthProvider.js.map +1 -1
  14. package/dist/module/providers/OAuthProvider.js +4 -2
  15. package/dist/module/providers/OAuthProvider.js.map +1 -1
  16. package/dist/module/types/auth.js +8 -0
  17. package/dist/module/types/auth.js.map +1 -1
  18. package/dist/module/version.js +1 -1
  19. package/dist/module/web/RNFBAuthModule.js +13 -11
  20. package/dist/module/web/RNFBAuthModule.js.map +1 -1
  21. package/dist/typescript/lib/credentials/OAuthCredential.d.ts +6 -0
  22. package/dist/typescript/lib/credentials/OAuthCredential.d.ts.map +1 -1
  23. package/dist/typescript/lib/index.d.ts.map +1 -1
  24. package/dist/typescript/lib/providers/AppleAuthProvider.d.ts +10 -3
  25. package/dist/typescript/lib/providers/AppleAuthProvider.d.ts.map +1 -1
  26. package/dist/typescript/lib/providers/OAuthProvider.d.ts.map +1 -1
  27. package/dist/typescript/lib/types/auth.d.ts +26 -0
  28. package/dist/typescript/lib/types/auth.d.ts.map +1 -1
  29. package/dist/typescript/lib/types/internal.d.ts +1 -1
  30. package/dist/typescript/lib/types/internal.d.ts.map +1 -1
  31. package/dist/typescript/lib/version.d.ts +1 -1
  32. package/dist/typescript/lib/web/RNFBAuthModule.d.ts +3 -1
  33. package/dist/typescript/lib/web/RNFBAuthModule.d.ts.map +1 -1
  34. package/ios/RNFBAuth/RNFBAuthHelper.h +338 -0
  35. package/ios/RNFBAuth/RNFBAuthHelper.m +2221 -0
  36. package/ios/RNFBAuth/RNFBAuthModule.h +7 -64
  37. package/ios/RNFBAuth/RNFBAuthModule.mm +179 -1637
  38. package/ios/generated/RNFBAuthTurboModules/RNFBAuthTurboModules-generated.mm +2 -2
  39. package/ios/generated/RNFBAuthTurboModules/RNFBAuthTurboModules.h +1 -0
  40. package/ios/generated/RNFBAuthTurboModulesJSI-generated.cpp +3 -2
  41. package/ios/generated/RNFBAuthTurboModulesJSI.h +5 -5
  42. package/lib/credentials/OAuthCredential.ts +44 -0
  43. package/lib/index.ts +13 -1
  44. package/lib/providers/AppleAuthProvider.ts +21 -5
  45. package/lib/providers/OAuthProvider.ts +2 -0
  46. package/lib/types/auth.ts +27 -0
  47. package/lib/types/internal.ts +2 -0
  48. package/lib/version.ts +1 -1
  49. package/lib/web/RNFBAuthModule.ts +34 -23
  50. package/package.json +4 -4
  51. package/specs/NativeRNFBTurboAuth.ts +2 -0
@@ -147,7 +147,7 @@ namespace facebook::react {
147
147
  }
148
148
 
149
149
  static facebook::jsi::Value __hostFunction_NativeRNFBTurboAuthSpecJSI_signInWithCredential(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
150
- return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "signInWithCredential", @selector(signInWithCredential:provider:authToken:authSecret:resolve:reject:), args, count);
150
+ return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "signInWithCredential", @selector(signInWithCredential:provider:authToken:authSecret:fullName:resolve:reject:), args, count);
151
151
  }
152
152
 
153
153
  static facebook::jsi::Value __hostFunction_NativeRNFBTurboAuthSpecJSI_signInWithProvider(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
@@ -363,7 +363,7 @@ namespace facebook::react {
363
363
  methodMap_["getIdTokenResult"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboAuthSpecJSI_getIdTokenResult};
364
364
 
365
365
 
366
- methodMap_["signInWithCredential"] = MethodMetadata {4, __hostFunction_NativeRNFBTurboAuthSpecJSI_signInWithCredential};
366
+ methodMap_["signInWithCredential"] = MethodMetadata {5, __hostFunction_NativeRNFBTurboAuthSpecJSI_signInWithCredential};
367
367
 
368
368
 
369
369
  methodMap_["signInWithProvider"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboAuthSpecJSI_signInWithProvider};
@@ -176,6 +176,7 @@ namespace JS {
176
176
  provider:(NSString *)provider
177
177
  authToken:(NSString *)authToken
178
178
  authSecret:(NSString *)authSecret
179
+ fullName:(NSDictionary * _Nullable)fullName
179
180
  resolve:(RCTPromiseResolveBlock)resolve
180
181
  reject:(RCTPromiseRejectBlock)reject;
181
182
  - (void)signInWithProvider:(NSString *)appName
@@ -236,7 +236,8 @@ static jsi::Value __hostFunction_NativeRNFBTurboAuthCxxSpecJSI_signInWithCredent
236
236
  count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt),
237
237
  count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt),
238
238
  count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asString(rt),
239
- count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asString(rt)
239
+ count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asString(rt),
240
+ count <= 4 || args[4].isNull() || args[4].isUndefined() ? std::nullopt : std::make_optional(args[4].asObject(rt))
240
241
  );
241
242
  }
242
243
  static jsi::Value __hostFunction_NativeRNFBTurboAuthCxxSpecJSI_signInWithProvider(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
@@ -502,7 +503,7 @@ NativeRNFBTurboAuthCxxSpecJSI::NativeRNFBTurboAuthCxxSpecJSI(std::shared_ptr<Cal
502
503
  methodMap_["updateProfile"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboAuthCxxSpecJSI_updateProfile};
503
504
  methodMap_["getIdToken"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboAuthCxxSpecJSI_getIdToken};
504
505
  methodMap_["getIdTokenResult"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboAuthCxxSpecJSI_getIdTokenResult};
505
- methodMap_["signInWithCredential"] = MethodMetadata {4, __hostFunction_NativeRNFBTurboAuthCxxSpecJSI_signInWithCredential};
506
+ methodMap_["signInWithCredential"] = MethodMetadata {5, __hostFunction_NativeRNFBTurboAuthCxxSpecJSI_signInWithCredential};
506
507
  methodMap_["signInWithProvider"] = MethodMetadata {2, __hostFunction_NativeRNFBTurboAuthCxxSpecJSI_signInWithProvider};
507
508
  methodMap_["signInWithPhoneNumber"] = MethodMetadata {3, __hostFunction_NativeRNFBTurboAuthCxxSpecJSI_signInWithPhoneNumber};
508
509
  methodMap_["verifyPhoneNumberWithMultiFactorInfo"] = MethodMetadata {3, __hostFunction_NativeRNFBTurboAuthCxxSpecJSI_verifyPhoneNumberWithMultiFactorInfo};
@@ -51,7 +51,7 @@ public:
51
51
  virtual jsi::Value updateProfile(jsi::Runtime &rt, jsi::String appName, jsi::Object props) = 0;
52
52
  virtual jsi::Value getIdToken(jsi::Runtime &rt, jsi::String appName, bool forceRefresh) = 0;
53
53
  virtual jsi::Value getIdTokenResult(jsi::Runtime &rt, jsi::String appName, bool forceRefresh) = 0;
54
- virtual jsi::Value signInWithCredential(jsi::Runtime &rt, jsi::String appName, jsi::String provider, jsi::String authToken, jsi::String authSecret) = 0;
54
+ virtual jsi::Value signInWithCredential(jsi::Runtime &rt, jsi::String appName, jsi::String provider, jsi::String authToken, jsi::String authSecret, std::optional<jsi::Object> fullName) = 0;
55
55
  virtual jsi::Value signInWithProvider(jsi::Runtime &rt, jsi::String appName, jsi::Object provider) = 0;
56
56
  virtual jsi::Value signInWithPhoneNumber(jsi::Runtime &rt, jsi::String appName, jsi::String phoneNumber, bool forceResend) = 0;
57
57
  virtual jsi::Value verifyPhoneNumberWithMultiFactorInfo(jsi::Runtime &rt, jsi::String appName, jsi::String hintUid, jsi::String sessionKey) = 0;
@@ -359,13 +359,13 @@ private:
359
359
  return bridging::callFromJs<jsi::Value>(
360
360
  rt, &T::getIdTokenResult, jsInvoker_, instance_, std::move(appName), std::move(forceRefresh));
361
361
  }
362
- jsi::Value signInWithCredential(jsi::Runtime &rt, jsi::String appName, jsi::String provider, jsi::String authToken, jsi::String authSecret) override {
362
+ jsi::Value signInWithCredential(jsi::Runtime &rt, jsi::String appName, jsi::String provider, jsi::String authToken, jsi::String authSecret, std::optional<jsi::Object> fullName) override {
363
363
  static_assert(
364
- bridging::getParameterCount(&T::signInWithCredential) == 5,
365
- "Expected signInWithCredential(...) to have 5 parameters");
364
+ bridging::getParameterCount(&T::signInWithCredential) == 6,
365
+ "Expected signInWithCredential(...) to have 6 parameters");
366
366
 
367
367
  return bridging::callFromJs<jsi::Value>(
368
- rt, &T::signInWithCredential, jsInvoker_, instance_, std::move(appName), std::move(provider), std::move(authToken), std::move(authSecret));
368
+ rt, &T::signInWithCredential, jsInvoker_, instance_, std::move(appName), std::move(provider), std::move(authToken), std::move(authSecret), std::move(fullName));
369
369
  }
370
370
  jsi::Value signInWithProvider(jsi::Runtime &rt, jsi::String appName, jsi::Object provider) override {
371
371
  static_assert(
@@ -16,6 +16,7 @@
16
16
  */
17
17
 
18
18
  import { AuthCredential, parseCredentialJSON } from './AuthCredential';
19
+ import type { AppleFullPersonName } from '../types/auth';
19
20
 
20
21
  type OAuthCredentialJSON = {
21
22
  providerId?: string;
@@ -25,6 +26,7 @@ type OAuthCredentialJSON = {
25
26
  rawNonce?: string;
26
27
  nonce?: string;
27
28
  secret?: string;
29
+ fullName?: AppleFullPersonName;
28
30
  };
29
31
 
30
32
  type OAuthCredentialParams = {
@@ -32,12 +34,47 @@ type OAuthCredentialParams = {
32
34
  accessToken?: string;
33
35
  rawNonce?: string;
34
36
  secret?: string;
37
+ /** @remarks Sign in with Apple only; see {@link OAuthCredentialOptions.fullName}. */
38
+ fullName?: AppleFullPersonName;
35
39
  /** @internal RNFB native bridge token slot override */
36
40
  bridgeToken?: string;
37
41
  /** @internal RNFB native bridge secret slot override */
38
42
  bridgeSecret?: string;
39
43
  };
40
44
 
45
+ const appleProviderId = 'apple.com';
46
+ const appleFullPersonNameKeys = [
47
+ 'namePrefix',
48
+ 'givenName',
49
+ 'middleName',
50
+ 'familyName',
51
+ 'nameSuffix',
52
+ 'nickname',
53
+ ] as const;
54
+
55
+ export function hasAppleFullPersonName(
56
+ fullName?: AppleFullPersonName | null,
57
+ ): fullName is AppleFullPersonName {
58
+ return (
59
+ !!fullName &&
60
+ appleFullPersonNameKeys.some(key => {
61
+ const value = fullName[key];
62
+ return typeof value === 'string' && value.trim().length > 0;
63
+ })
64
+ );
65
+ }
66
+
67
+ function resolveAppleFullPersonName(
68
+ providerId: string,
69
+ fullName?: AppleFullPersonName,
70
+ ): AppleFullPersonName | undefined {
71
+ if (providerId.toLowerCase() !== appleProviderId || !hasAppleFullPersonName(fullName)) {
72
+ return undefined;
73
+ }
74
+
75
+ return fullName;
76
+ }
77
+
41
78
  function resolveOAuthBridgeFields(params: OAuthCredentialParams): {
42
79
  token: string;
43
80
  secret: string;
@@ -75,6 +112,8 @@ export class OAuthCredential extends AuthCredential {
75
112
  readonly accessToken?: string;
76
113
  /** @remarks Used for Sign in with Apple and Facebook limited-login flows. OAuth 1.0 token secrets (e.g. Twitter) use the inherited AuthCredential secret bridge field instead. */
77
114
  readonly rawNonce?: string;
115
+ /** @remarks Sign in with Apple only; see {@link OAuthCredentialOptions.fullName}. */
116
+ readonly fullName?: AppleFullPersonName;
78
117
 
79
118
  constructor(providerId: string, params: OAuthCredentialParams) {
80
119
  const bridge = resolveOAuthBridgeFields(params);
@@ -82,6 +121,7 @@ export class OAuthCredential extends AuthCredential {
82
121
  this.idToken = params.idToken;
83
122
  this.accessToken = params.accessToken;
84
123
  this.rawNonce = params.rawNonce;
124
+ this.fullName = resolveAppleFullPersonName(providerId, params.fullName);
85
125
  }
86
126
 
87
127
  toJSON(): object {
@@ -97,6 +137,9 @@ export class OAuthCredential extends AuthCredential {
97
137
  if (this.secret && !this.rawNonce) {
98
138
  json.secret = this.secret;
99
139
  }
140
+ if (this.fullName) {
141
+ json.fullName = this.fullName;
142
+ }
100
143
  return json;
101
144
  }
102
145
 
@@ -111,6 +154,7 @@ export class OAuthCredential extends AuthCredential {
111
154
  accessToken: parsed.accessToken,
112
155
  rawNonce: parsed.rawNonce ?? parsed.nonce,
113
156
  secret: parsed.secret,
157
+ fullName: parsed.fullName,
114
158
  });
115
159
  }
116
160
  }
package/lib/index.ts CHANGED
@@ -35,6 +35,7 @@ export {
35
35
  OAuthCredential,
36
36
  PhoneAuthCredential,
37
37
  } from './credentials';
38
+ import { hasAppleFullPersonName } from './credentials/OAuthCredential';
38
39
 
39
40
  import {
40
41
  isAndroid,
@@ -88,6 +89,7 @@ import type {
88
89
  ActionCodeSettings,
89
90
  AdditionalUserInfo,
90
91
  AdditionalUserInfoNative,
92
+ AppleFullPersonName,
91
93
  ApplicationVerifier,
92
94
  Auth,
93
95
  AuthCredential,
@@ -601,8 +603,18 @@ class FirebaseAuthModule extends FirebaseModule<typeof nativeModuleName> {
601
603
  }
602
604
 
603
605
  signInWithCredential(credential: AuthCredential): Promise<UserCredential> {
606
+ const fullName = (credential as { fullName?: AppleFullPersonName }).fullName;
607
+ const appleFullName =
608
+ credential.providerId.toLowerCase() === 'apple.com' && hasAppleFullPersonName(fullName)
609
+ ? { ...fullName }
610
+ : null;
604
611
  return this.native
605
- .signInWithCredential(credential.providerId, credential.token, credential.secret)
612
+ .signInWithCredential(
613
+ credential.providerId,
614
+ credential.token,
615
+ credential.secret,
616
+ appleFullName,
617
+ )
606
618
  .then((userCredential: NativeUserCredentialInternal) =>
607
619
  this._setUserCredential(userCredential),
608
620
  );
@@ -15,8 +15,8 @@
15
15
  *
16
16
  */
17
17
 
18
- import { AuthCredential } from '../credentials';
19
- import type { AuthCredential as AuthCredentialType } from '../types/auth';
18
+ import { OAuthCredential } from '../credentials';
19
+ import type { AppleFullPersonName } from '../types/auth';
20
20
 
21
21
  const providerId = 'apple.com' as const;
22
22
 
@@ -26,7 +26,7 @@ const providerId = 'apple.com' as const;
26
26
  * @example
27
27
  * ```js
28
28
  * const provider = new OAuthProvider('apple.com');
29
- * const credential = provider.credential({ idToken, rawNonce });
29
+ * const credential = provider.credential({ idToken, rawNonce, fullName });
30
30
  * ```
31
31
  */
32
32
  export default class AppleAuthProvider {
@@ -38,7 +38,23 @@ export default class AppleAuthProvider {
38
38
  return providerId;
39
39
  }
40
40
 
41
- static credential(token: string, secret?: string): AuthCredentialType {
42
- return new AuthCredential(providerId, providerId, token, secret ?? '');
41
+ /**
42
+ * @param token The Apple identity token.
43
+ * @param secret The raw nonce used to obtain the identity token.
44
+ * @param fullName The user's full name, as shared by Sign in with Apple on the user's first
45
+ * authorization. See {@link OAuthCredentialOptions.fullName} for platform support.
46
+ */
47
+ static credential(
48
+ token: string,
49
+ secret?: string,
50
+ fullName?: AppleFullPersonName,
51
+ ): OAuthCredential {
52
+ return new OAuthCredential(providerId, {
53
+ idToken: token,
54
+ rawNonce: secret,
55
+ fullName,
56
+ bridgeToken: token,
57
+ bridgeSecret: secret ?? '',
58
+ });
43
59
  }
44
60
  }
@@ -94,6 +94,7 @@ export default class OAuthProvider {
94
94
  idToken: credential.idToken,
95
95
  accessToken: credential.accessToken,
96
96
  rawNonce: credential.rawNonce ?? credential.nonce,
97
+ fullName: credential.fullName,
97
98
  });
98
99
  }
99
100
 
@@ -112,6 +113,7 @@ export default class OAuthProvider {
112
113
  idToken: params.idToken,
113
114
  accessToken: params.accessToken,
114
115
  rawNonce: params.rawNonce,
116
+ fullName: params.fullName,
115
117
  });
116
118
  }
117
119
 
package/lib/types/auth.ts CHANGED
@@ -169,10 +169,37 @@ export interface ApplicationVerifier {
169
169
 
170
170
  export type CustomParameters = Record<string, string>;
171
171
 
172
+ /**
173
+ * The user's full name, as shared by Sign in with Apple.
174
+ *
175
+ * Apple only shares this data on the user's first authorization for a given app; it is
176
+ * omitted from the `ASAuthorizationAppleIDCredential` on subsequent sign-ins, so it should be
177
+ * captured and forwarded on the first sign-in.
178
+ */
179
+ export interface AppleFullPersonName {
180
+ namePrefix?: string | null;
181
+ givenName?: string | null;
182
+ middleName?: string | null;
183
+ familyName?: string | null;
184
+ nameSuffix?: string | null;
185
+ nickname?: string | null;
186
+ }
187
+
172
188
  export interface OAuthCredentialOptions {
173
189
  idToken?: string;
174
190
  accessToken?: string;
175
191
  rawNonce?: string;
192
+ /**
193
+ * The user's full name, as shared by Sign in with Apple on the user's first authorization.
194
+ *
195
+ * @remarks Only retained for `apple.com` credentials with at least one non-empty name field,
196
+ * and only forwarded to the native SDK on iOS, where it is passed to
197
+ * `FIROAuthProvider.appleCredentialWithIDToken:rawNonce:fullName:` so Firebase can store it as
198
+ * {@link User.displayName} while creating the account. The Firebase Android SDK has no
199
+ * equivalent credential-level API; on Android (and Web) this field is ignored and the display
200
+ * name must be set with {@link updateProfile} after sign-in.
201
+ */
202
+ fullName?: AppleFullPersonName;
176
203
  }
177
204
 
178
205
  export interface AuthProvider {
@@ -267,6 +267,8 @@ export interface RNFBAuthModule {
267
267
  providerId: string,
268
268
  token: string,
269
269
  secret?: string | null,
270
+ // Sign in with Apple full name (iOS only; see AppleFullPersonName in ./auth.ts).
271
+ fullName?: Record<string, unknown> | null,
270
272
  ): Promise<NativeUserCredentialInternal>;
271
273
  revokeToken(authorizationCode: string): Promise<void>;
272
274
  sendPasswordResetEmail(
package/lib/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by genversion.
2
- export const version = '26.0.0';
2
+ export const version = '26.1.0';
@@ -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
 
@@ -863,6 +858,8 @@ export default {
863
858
  provider: string,
864
859
  authToken: string,
865
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,
866
863
  ) {
867
864
  return guard(async () => {
868
865
  const auth = getCachedAuthInstance(appName);
@@ -918,6 +915,13 @@ export default {
918
915
  });
919
916
  },
920
917
 
918
+ verifyPhoneNumberWithMultiFactorInfo() {
919
+ return rejectPromiseWithCodeAndMessage(
920
+ 'unsupported',
921
+ 'This operation is not supported in this environment.',
922
+ );
923
+ },
924
+
921
925
  verifyPhoneNumberForMultiFactor() {
922
926
  return rejectPromiseWithCodeAndMessage(
923
927
  'unsupported',
@@ -939,6 +943,13 @@ export default {
939
943
  );
940
944
  },
941
945
 
946
+ resolveTotpSignIn() {
947
+ return rejectPromiseWithCodeAndMessage(
948
+ 'unsupported',
949
+ 'This operation is not supported in this environment.',
950
+ );
951
+ },
952
+
942
953
  confirmationResultConfirm() {
943
954
  return rejectPromiseWithCodeAndMessage(
944
955
  'unsupported',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-firebase/auth",
3
- "version": "26.0.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",
@@ -45,11 +45,11 @@
45
45
  "plist": "^3.1.1"
46
46
  },
47
47
  "peerDependencies": {
48
- "@react-native-firebase/app": "26.0.0",
48
+ "@react-native-firebase/app": "26.1.0",
49
49
  "expo": ">=47.0.0"
50
50
  },
51
51
  "devDependencies": {
52
- "@react-native-firebase/app": "26.0.0",
52
+ "@react-native-firebase/app": "26.1.0",
53
53
  "@types/plist": "^3.0.5",
54
54
  "expo": "^55.0.18",
55
55
  "react-native-builder-bob": "^0.40.13"
@@ -101,5 +101,5 @@
101
101
  "node_modules/",
102
102
  "dist/"
103
103
  ],
104
- "gitHead": "2a360acb2aebdd39dd40e31be386b30697270626"
104
+ "gitHead": "59d053eca14ab8aa80e5ac76887014925c67e52b"
105
105
  }
@@ -60,6 +60,8 @@ export interface Spec extends TurboModule {
60
60
  provider: string,
61
61
  authToken: string,
62
62
  authSecret: string,
63
+ // Sign in with Apple full name (iOS only; see AppleFullPersonName in lib/types/auth.ts).
64
+ fullName?: Object | null,
63
65
  ): Promise<Object>;
64
66
  signInWithProvider(appName: string, provider: Object): Promise<Object>;
65
67
  signInWithPhoneNumber(