@react-native-firebase/auth 23.8.6 → 23.8.8
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 +16 -0
- package/lib/version.js +1 -1
- package/lib/web/RNFBAuthModule.js +11 -3
- package/package.json +4 -4
- package/plugin/build/ios/urlTypes.js +28 -1
- package/plugin/src/ios/urlTypes.ts +30 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [23.8.8](https://github.com/invertase/react-native-firebase/compare/v23.8.6...v23.8.8) (2026-03-12)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **auth, web:** avoid react-native-specific methods in web ([cef8fed](https://github.com/invertase/react-native-firebase/commit/cef8fed1bd6099f4b028c85fd70193394ba6328c))
|
|
11
|
+
- **auth:** auto-register encoded app ID URL scheme for phone auth reCAPTCHA ([#8902](https://github.com/invertase/react-native-firebase/issues/8902)) ([b7f8772](https://github.com/invertase/react-native-firebase/commit/b7f8772ccdea706e939c678eeed70c0fae66a33b))
|
|
12
|
+
- **messaging, expo:** retrieve expo-notification config if available, then deprecated notification ([#8663](https://github.com/invertase/react-native-firebase/issues/8663)) ([eb90301](https://github.com/invertase/react-native-firebase/commit/eb90301c49af807c4bd3eecadd9a67364c4a30a4))
|
|
13
|
+
|
|
14
|
+
## [23.8.7](https://github.com/invertase/react-native-firebase/compare/v23.8.6...v23.8.7) (2026-03-12)
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
- **auth, web:** avoid react-native-specific methods in web ([cef8fed](https://github.com/invertase/react-native-firebase/commit/cef8fed1bd6099f4b028c85fd70193394ba6328c))
|
|
19
|
+
- **auth:** auto-register encoded app ID URL scheme for phone auth reCAPTCHA ([#8902](https://github.com/invertase/react-native-firebase/issues/8902)) ([b7f8772](https://github.com/invertase/react-native-firebase/commit/b7f8772ccdea706e939c678eeed70c0fae66a33b))
|
|
20
|
+
- **messaging, expo:** retrieve expo-notification config if available, then deprecated notification ([#8663](https://github.com/invertase/react-native-firebase/issues/8663)) ([eb90301](https://github.com/invertase/react-native-firebase/commit/eb90301c49af807c4bd3eecadd9a67364c4a30a4))
|
|
21
|
+
|
|
6
22
|
## [23.8.6](https://github.com/invertase/react-native-firebase/compare/v23.8.5...v23.8.6) (2026-02-03)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @react-native-firebase/auth
|
package/lib/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
module.exports = '23.8.
|
|
2
|
+
module.exports = '23.8.8';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
1
2
|
import {
|
|
2
3
|
getApp,
|
|
3
4
|
initializeAuth,
|
|
@@ -263,9 +264,16 @@ function getCachedAuthInstance(appName) {
|
|
|
263
264
|
' await firebase.initializeApp({ ... });\n',
|
|
264
265
|
);
|
|
265
266
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
267
|
+
|
|
268
|
+
const authOptions = {};
|
|
269
|
+
if (Platform.OS !== 'web') {
|
|
270
|
+
// Non-web platforms pull the react-native export from package.json and
|
|
271
|
+
// get a bundle that defines `getReactNativePersistence` etc, but web platforms
|
|
272
|
+
// do *not* have that method defined. So we only call it for non-web platforms
|
|
273
|
+
authOptions.persistence = getReactNativePersistence(getReactNativeAsyncStorageInternal());
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
instances[appName] = initializeAuth(getApp(appName), authOptions);
|
|
269
277
|
}
|
|
270
278
|
return instances[appName];
|
|
271
279
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-firebase/auth",
|
|
3
|
-
"version": "23.8.
|
|
3
|
+
"version": "23.8.8",
|
|
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": "lib/index.js",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"plist": "^3.1.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@react-native-firebase/app": "23.8.
|
|
30
|
+
"@react-native-firebase/app": "23.8.8",
|
|
31
31
|
"expo": ">=47.0.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/plist": "^3.0.5",
|
|
35
|
-
"expo": "^
|
|
35
|
+
"expo": "^55.0.5"
|
|
36
36
|
},
|
|
37
37
|
"peerDependenciesMeta": {
|
|
38
38
|
"expo": {
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"access": "public",
|
|
44
44
|
"provenance": true
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "d17b898bee0be82259fc1b88f46106a927bf81aa"
|
|
47
47
|
}
|
|
@@ -38,6 +38,21 @@ function reversedClientIDExists(googleServiceFilePath) {
|
|
|
38
38
|
return false;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
+
// Derives the Encoded App ID from GOOGLE_APP_ID for reCAPTCHA URL scheme registration.
|
|
42
|
+
// Firebase requires this scheme for phone auth / SMS MFA reCAPTCHA fallback on iOS.
|
|
43
|
+
// See: https://firebase.google.com/docs/auth/ios/multi-factor#using_recaptcha_verification
|
|
44
|
+
// Transformation: "1:123456789012:ios:abc123" -> "app-1-123456789012-ios-abc123"
|
|
45
|
+
function getEncodedAppId(googleServiceFilePath) {
|
|
46
|
+
try {
|
|
47
|
+
const googleServicePlist = fs_1.default.readFileSync(googleServiceFilePath, 'utf8');
|
|
48
|
+
const googleServiceJson = plist_1.default.parse(googleServicePlist);
|
|
49
|
+
const GOOGLE_APP_ID = googleServiceJson.GOOGLE_APP_ID;
|
|
50
|
+
return 'app-' + GOOGLE_APP_ID.replace(/:/g, '-');
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
throw new Error('[@react-native-firebase/auth] Failed to parse your GoogleService-Info.plist. Are you sure it is a valid Info.Plist file with a GOOGLE_APP_ID field?');
|
|
54
|
+
}
|
|
55
|
+
}
|
|
41
56
|
// add phone auth support by configuring recaptcha
|
|
42
57
|
// https://github.com/invertase/react-native-firebase/pull/6167
|
|
43
58
|
function addUriScheme(config, reversedClientId) {
|
|
@@ -70,7 +85,19 @@ function setUrlTypesForCaptcha({ config, }) {
|
|
|
70
85
|
}
|
|
71
86
|
else {
|
|
72
87
|
// eslint-disable-next-line no-console
|
|
73
|
-
console.warn('[@react-native-firebase/auth] REVERSED_CLIENT_ID
|
|
88
|
+
console.warn('[@react-native-firebase/auth] REVERSED_CLIENT_ID not found in GoogleService-Info.plist. This is required for Google Sign-In — if you need it, enable Google Sign-In in the Firebase console and re-download your plist. Phone auth reCAPTCHA will still work via the Encoded App ID scheme.');
|
|
89
|
+
}
|
|
90
|
+
// Always add the Encoded App ID derived from GOOGLE_APP_ID for phone auth reCAPTCHA fallback.
|
|
91
|
+
// Firebase requires this URL scheme on iOS when APNs is unavailable (e.g. Simulator).
|
|
92
|
+
// GOOGLE_APP_ID is always present in a valid GoogleService-Info.plist, so no warning needed here.
|
|
93
|
+
// See: https://firebase.google.com/docs/auth/ios/multi-factor#using_recaptcha_verification
|
|
94
|
+
try {
|
|
95
|
+
const encodedAppId = getEncodedAppId(googleServiceFilePath);
|
|
96
|
+
addUriScheme(config, encodedAppId);
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
// silently skip — a missing GOOGLE_APP_ID means the plist is malformed;
|
|
100
|
+
// the file-existence and parse checks above will have already surfaced the real problem.
|
|
74
101
|
}
|
|
75
102
|
return config;
|
|
76
103
|
}
|
|
@@ -42,6 +42,23 @@ function reversedClientIDExists(googleServiceFilePath: string): boolean {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
// Derives the Encoded App ID from GOOGLE_APP_ID for reCAPTCHA URL scheme registration.
|
|
46
|
+
// Firebase requires this scheme for phone auth / SMS MFA reCAPTCHA fallback on iOS.
|
|
47
|
+
// See: https://firebase.google.com/docs/auth/ios/multi-factor#using_recaptcha_verification
|
|
48
|
+
// Transformation: "1:123456789012:ios:abc123" -> "app-1-123456789012-ios-abc123"
|
|
49
|
+
function getEncodedAppId(googleServiceFilePath: string): string {
|
|
50
|
+
try {
|
|
51
|
+
const googleServicePlist = fs.readFileSync(googleServiceFilePath, 'utf8');
|
|
52
|
+
const googleServiceJson = plist.parse(googleServicePlist) as { GOOGLE_APP_ID: string };
|
|
53
|
+
const GOOGLE_APP_ID = googleServiceJson.GOOGLE_APP_ID;
|
|
54
|
+
return 'app-' + GOOGLE_APP_ID.replace(/:/g, '-');
|
|
55
|
+
} catch {
|
|
56
|
+
throw new Error(
|
|
57
|
+
'[@react-native-firebase/auth] Failed to parse your GoogleService-Info.plist. Are you sure it is a valid Info.Plist file with a GOOGLE_APP_ID field?',
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
45
62
|
// add phone auth support by configuring recaptcha
|
|
46
63
|
// https://github.com/invertase/react-native-firebase/pull/6167
|
|
47
64
|
function addUriScheme(
|
|
@@ -97,9 +114,21 @@ export function setUrlTypesForCaptcha({
|
|
|
97
114
|
} else {
|
|
98
115
|
// eslint-disable-next-line no-console
|
|
99
116
|
console.warn(
|
|
100
|
-
'[@react-native-firebase/auth] REVERSED_CLIENT_ID
|
|
117
|
+
'[@react-native-firebase/auth] REVERSED_CLIENT_ID not found in GoogleService-Info.plist. This is required for Google Sign-In — if you need it, enable Google Sign-In in the Firebase console and re-download your plist. Phone auth reCAPTCHA will still work via the Encoded App ID scheme.',
|
|
101
118
|
);
|
|
102
119
|
}
|
|
103
120
|
|
|
121
|
+
// Always add the Encoded App ID derived from GOOGLE_APP_ID for phone auth reCAPTCHA fallback.
|
|
122
|
+
// Firebase requires this URL scheme on iOS when APNs is unavailable (e.g. Simulator).
|
|
123
|
+
// GOOGLE_APP_ID is always present in a valid GoogleService-Info.plist, so no warning needed here.
|
|
124
|
+
// See: https://firebase.google.com/docs/auth/ios/multi-factor#using_recaptcha_verification
|
|
125
|
+
try {
|
|
126
|
+
const encodedAppId = getEncodedAppId(googleServiceFilePath);
|
|
127
|
+
addUriScheme(config, encodedAppId);
|
|
128
|
+
} catch {
|
|
129
|
+
// silently skip — a missing GOOGLE_APP_ID means the plist is malformed;
|
|
130
|
+
// the file-existence and parse checks above will have already surfaced the real problem.
|
|
131
|
+
}
|
|
132
|
+
|
|
104
133
|
return config;
|
|
105
134
|
}
|