react-native-nitro-auth 0.6.4 → 0.6.5
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 +7 -0
- package/README.md +5 -0
- package/app.plugin.js +31 -6
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.5 - 2026-06-11
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Moved the Expo iOS Google Sign-In CocoaPods modular-header setup into the package config plugin so Expo/CNG consumers no longer need app-level `AppCheckCore`, `GoogleUtilities`, or `RecaptchaInterop` pod workarounds.
|
|
8
|
+
- Added the package plugin dependency needed to apply the iOS build-properties setup from the package.
|
|
9
|
+
|
|
3
10
|
## 0.6.4 - 2026-06-11
|
|
4
11
|
|
|
5
12
|
### Added
|
package/README.md
CHANGED
|
@@ -106,6 +106,11 @@ Plugin options:
|
|
|
106
106
|
Web reads provider client IDs from `expo.extra`; native platforms read values
|
|
107
107
|
written by the plugin during prebuild.
|
|
108
108
|
|
|
109
|
+
On iOS, the plugin also applies the CocoaPods modular-header settings required
|
|
110
|
+
by the Google Sign-In dependency chain (`AppCheckCore`, `GoogleUtilities`, and
|
|
111
|
+
`RecaptchaInterop`). Expo apps should not add those pods manually through
|
|
112
|
+
`expo-build-properties`.
|
|
113
|
+
|
|
109
114
|
Microsoft tenant values are validated before opening the authorization URL. Use
|
|
110
115
|
`common`, `organizations`, `consumers`, a tenant ID, or a tenant domain for
|
|
111
116
|
standard Entra ID. For B2C, set `microsoftB2cDomain` to a hostname such as
|
package/app.plugin.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const { withBuildProperties } = require("expo-build-properties");
|
|
1
2
|
const {
|
|
2
3
|
withInfoPlist,
|
|
3
4
|
withEntitlementsPlist,
|
|
@@ -8,10 +9,34 @@ const {
|
|
|
8
9
|
} = require("@expo/config-plugins");
|
|
9
10
|
const pkg = require("./package.json");
|
|
10
11
|
|
|
12
|
+
const googleSignInIosPods = [
|
|
13
|
+
{ name: "AppCheckCore", modular_headers: true },
|
|
14
|
+
{ name: "GoogleUtilities", modular_headers: true },
|
|
15
|
+
{ name: "RecaptchaInterop", modular_headers: true },
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
function getNitroAuthIosExtraPods(extraPods = []) {
|
|
19
|
+
const pods = Array.isArray(extraPods) ? [...extraPods] : [];
|
|
20
|
+
const existingPodNames = new Set(pods.map((pod) => pod?.name));
|
|
21
|
+
|
|
22
|
+
for (const pod of googleSignInIosPods) {
|
|
23
|
+
if (!existingPodNames.has(pod.name)) {
|
|
24
|
+
pods.push(pod);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return pods;
|
|
29
|
+
}
|
|
30
|
+
|
|
11
31
|
const withNitroAuth = (config, props = {}) => {
|
|
12
32
|
const { ios = {}, android = {} } = props;
|
|
13
33
|
|
|
14
|
-
|
|
34
|
+
config = withBuildProperties(config, {
|
|
35
|
+
ios: {
|
|
36
|
+
extraPods: getNitroAuthIosExtraPods(config.ios?.extraPods),
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
|
|
15
40
|
config = withInfoPlist(config, (config) => {
|
|
16
41
|
if (ios.googleClientId) {
|
|
17
42
|
config.modResults.GIDClientID = ios.googleClientId;
|
|
@@ -34,10 +59,8 @@ const withNitroAuth = (config, props = {}) => {
|
|
|
34
59
|
];
|
|
35
60
|
}
|
|
36
61
|
}
|
|
37
|
-
// Microsoft configuration
|
|
38
62
|
if (ios.microsoftClientId) {
|
|
39
63
|
config.modResults.MSALClientID = ios.microsoftClientId;
|
|
40
|
-
// Add MSAL redirect URL scheme
|
|
41
64
|
const msalScheme = `msauth.${config.ios?.bundleIdentifier}`;
|
|
42
65
|
const existingSchemes = config.modResults.CFBundleURLTypes || [];
|
|
43
66
|
if (
|
|
@@ -62,7 +85,6 @@ const withNitroAuth = (config, props = {}) => {
|
|
|
62
85
|
return config;
|
|
63
86
|
});
|
|
64
87
|
|
|
65
|
-
// 2. iOS Entitlements
|
|
66
88
|
if (ios.appleSignIn === true) {
|
|
67
89
|
config = withEntitlementsPlist(config, (config) => {
|
|
68
90
|
config.modResults["com.apple.developer.applesignin"] = ["Default"];
|
|
@@ -70,7 +92,6 @@ const withNitroAuth = (config, props = {}) => {
|
|
|
70
92
|
});
|
|
71
93
|
}
|
|
72
94
|
|
|
73
|
-
// 3. Android Strings (for Google and Microsoft Client IDs)
|
|
74
95
|
config = withStringsXml(config, (config) => {
|
|
75
96
|
if (android.googleClientId) {
|
|
76
97
|
config.modResults = AndroidConfig.Strings.setStringItem(
|
|
@@ -119,7 +140,6 @@ const withNitroAuth = (config, props = {}) => {
|
|
|
119
140
|
return config;
|
|
120
141
|
});
|
|
121
142
|
|
|
122
|
-
// 4. Android Manifest for MSAL redirect
|
|
123
143
|
if (android.microsoftClientId) {
|
|
124
144
|
config = withAndroidManifest(config, (config) => {
|
|
125
145
|
const manifest = config.modResults.manifest;
|
|
@@ -170,3 +190,8 @@ const withNitroAuth = (config, props = {}) => {
|
|
|
170
190
|
};
|
|
171
191
|
|
|
172
192
|
module.exports = createRunOncePlugin(withNitroAuth, pkg.name, pkg.version);
|
|
193
|
+
module.exports.withNitroAuth = withNitroAuth;
|
|
194
|
+
module.exports._internal = {
|
|
195
|
+
getNitroAuthIosExtraPods,
|
|
196
|
+
googleSignInIosPods,
|
|
197
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-nitro-auth",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.5",
|
|
4
4
|
"description": "High-performance authentication library for React Native with Google Sign-In, Apple Sign-In, and Microsoft Sign-In support, powered by Nitro Modules (JSI)",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -83,6 +83,9 @@
|
|
|
83
83
|
"registry": "https://registry.npmjs.org/",
|
|
84
84
|
"access": "public"
|
|
85
85
|
},
|
|
86
|
+
"dependencies": {
|
|
87
|
+
"expo-build-properties": "~56.0.18"
|
|
88
|
+
},
|
|
86
89
|
"devDependencies": {
|
|
87
90
|
"@expo/config-plugins": "^56.0.8",
|
|
88
91
|
"@react-native/babel-preset": "^0.85.3",
|