@react-native-firebase/auth 26.0.0 → 26.2.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 (54) hide show
  1. package/CHANGELOG.md +18 -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 +177 -1638
  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 +7 -8
  51. package/plugin/build/ios/urlTypes.js +1 -1
  52. package/plugin/src/ios/urlTypes.ts +1 -1
  53. package/plugin/tsconfig.json +2 -1
  54. package/specs/NativeRNFBTurboAuth.ts +2 -0
@@ -15,72 +15,15 @@
15
15
  *
16
16
  */
17
17
 
18
- #import <Firebase/Firebase.h>
18
+ // This header is intentionally Firebase-free. See RNFBAuthHelper.h for why:
19
+ // FirebaseAuth's core `FIRAuth`/`FIRUser` classes are implemented in Swift, so
20
+ // `@import FirebaseAuth` (the only way to get their real interface) can't be
21
+ // used from an Objective-C++ (.mm) TurboModule when C++ modules are disabled
22
+ // (required by React Native's JSI headers). All Firebase Auth calls are routed
23
+ // through RNFBAuthHelper instead. See docs/ios-spm.mdx and
24
+ // okf-bundle/ios-spm-native-imports.md.
19
25
  #import <Foundation/Foundation.h>
20
26
  #import "RNFBAuthTurboModules.h"
21
27
 
22
28
  @interface RNFBAuthModule : NSObject <NativeRNFBTurboAuthSpec>
23
29
  @end
24
-
25
- extern NSString* const AuthErrorCode_toJSErrorCode[];
26
- NSString* const AuthErrorCode_toJSErrorCode[] = {
27
- [FIRAuthErrorCodeInvalidCustomToken] = @"invalid-custom-token",
28
- [FIRAuthErrorCodeCustomTokenMismatch] = @"custom-token-mismatch",
29
- [FIRAuthErrorCodeInvalidCredential] = @"invalid-credential",
30
- [FIRAuthErrorCodeUserDisabled] = @"user-disabled",
31
- [FIRAuthErrorCodeOperationNotAllowed] = @"operation-not-allowed",
32
- [FIRAuthErrorCodeEmailAlreadyInUse] = @"email-already-in-use",
33
- [FIRAuthErrorCodeInvalidEmail] = @"invalid-email",
34
- [FIRAuthErrorCodeWrongPassword] = @"wrong-password",
35
- [FIRAuthErrorCodeTooManyRequests] = @"too-many-requests",
36
- [FIRAuthErrorCodeUserNotFound] = @"user-not-found",
37
- [FIRAuthErrorCodeAccountExistsWithDifferentCredential] =
38
- @"account-exists-with-different-credential",
39
- [FIRAuthErrorCodeRequiresRecentLogin] = @"requires-recent-login",
40
- [FIRAuthErrorCodeProviderAlreadyLinked] = @"provider-already-linked",
41
- [FIRAuthErrorCodeNoSuchProvider] = @"no-such-provider",
42
- [FIRAuthErrorCodeInvalidUserToken] = @"invalid-user-token",
43
- [FIRAuthErrorCodeNetworkError] = @"network-request-failed",
44
- [FIRAuthErrorCodeUserTokenExpired] = @"user-token-expired",
45
- [FIRAuthErrorCodeInvalidAPIKey] = @"invalid-api-key",
46
- [FIRAuthErrorCodeUserMismatch] = @"user-mismatch",
47
- [FIRAuthErrorCodeCredentialAlreadyInUse] = @"credential-already-in-use",
48
- [FIRAuthErrorCodeWeakPassword] = @"weak-password",
49
- [FIRAuthErrorCodeAppNotAuthorized] = @"app-not-authorized",
50
- [FIRAuthErrorCodeExpiredActionCode] = @"expired-action-code",
51
- [FIRAuthErrorCodeInvalidActionCode] = @"invalid-action-code",
52
- [FIRAuthErrorCodeInvalidMessagePayload] = @"invalid-message-payload",
53
- [FIRAuthErrorCodeInvalidSender] = @"invalid-sender",
54
- [FIRAuthErrorCodeInvalidRecipientEmail] = @"invalid-recipient-email",
55
- [FIRAuthErrorCodeMissingEmail] = @"invalid-email",
56
- [FIRAuthErrorCodeMissingIosBundleID] = @"missing-ios-bundle-id",
57
- [FIRAuthErrorCodeMissingAndroidPackageName] = @"missing-android-pkg-name",
58
- [FIRAuthErrorCodeUnauthorizedDomain] = @"unauthorized-domain",
59
- [FIRAuthErrorCodeInvalidContinueURI] = @"invalid-continue-uri",
60
- [FIRAuthErrorCodeMissingContinueURI] = @"missing-continue-uri",
61
- [FIRAuthErrorCodeMissingPhoneNumber] = @"missing-phone-number",
62
- [FIRAuthErrorCodeInvalidPhoneNumber] = @"invalid-phone-number",
63
- [FIRAuthErrorCodeMissingVerificationCode] = @"missing-verification-code",
64
- [FIRAuthErrorCodeInvalidVerificationCode] = @"invalid-verification-code",
65
- [FIRAuthErrorCodeMissingVerificationID] = @"missing-verification-id",
66
- [FIRAuthErrorCodeInvalidVerificationID] = @"invalid-verification-id",
67
- [FIRAuthErrorCodeMissingAppCredential] = @"missing-app-credential",
68
- [FIRAuthErrorCodeInvalidAppCredential] = @"invalid-app-credential",
69
- [FIRAuthErrorCodeSessionExpired] = @"code-expired",
70
- [FIRAuthErrorCodeQuotaExceeded] = @"quota-exceeded",
71
- [FIRAuthErrorCodeMissingAppToken] = @"missing-apns-token",
72
- [FIRAuthErrorCodeNotificationNotForwarded] = @"notification-not-forwarded",
73
- [FIRAuthErrorCodeAppNotVerified] = @"app-not-verified",
74
- [FIRAuthErrorCodeCaptchaCheckFailed] = @"captcha-check-failed",
75
- [FIRAuthErrorCodeWebContextAlreadyPresented] = @"cancelled-popup-request",
76
- [FIRAuthErrorCodeWebContextCancelled] = @"popup-closed-by-user",
77
- [FIRAuthErrorCodeAppVerificationUserInteractionFailure] =
78
- @"app-verification-user-interaction-failure",
79
- [FIRAuthErrorCodeInvalidClientID] = @"invalid-oauth-client-id",
80
- [FIRAuthErrorCodeWebNetworkRequestFailed] = @"network-request-failed",
81
- [FIRAuthErrorCodeWebInternalError] = @"internal-error",
82
- [FIRAuthErrorCodeNullUser] = @"null-user",
83
- [FIRAuthErrorCodeKeychainError] = @"keychain-error",
84
- [FIRAuthErrorCodeInternalError] = @"internal-error",
85
- [FIRAuthErrorCodeMalformedJWT] = @"malformed-jwt",
86
- [FIRAuthErrorCodeSecondFactorRequired] = @"multi-factor-auth-required"};