Skip to content

Commit 46237bb

Browse files
Upgrade SDK to React Native 0.79.2 and Add Support for Expo SDK 53 (#1147)
1 parent 84cec85 commit 46237bb

65 files changed

Lines changed: 3254 additions & 4165 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
*.pbxproj -text
2+
# specific for windows script files
3+
*.bat text eol=crlf

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ DerivedData
2828
*.ipa
2929
*.xcuserstate
3030
project.xcworkspace
31+
**/.xcode.env.local
3132

3233
# Android/IJ
3334
#
@@ -67,6 +68,15 @@ buck-out/
6768
\.buckd/
6869
android/app/libs
6970
android/keystores/debug.keystore
71+
.kotlin/
72+
73+
# Yarn
74+
.yarn/*
75+
!.yarn/patches
76+
!.yarn/plugins
77+
!.yarn/releases
78+
!.yarn/sdks
79+
!.yarn/versions
7080

7181
# Expo
7282
.expo/
@@ -77,6 +87,10 @@ android/keystores/debug.keystore
7787
# generated by bob
7888
lib/
7989

90+
# React Native Codegen
91+
ios/generated
92+
android/generated
93+
8094
# Other
8195
dist/
8296
out/

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm run precommit

.snyk

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,6 @@ ignore:
77
reason: No fix available
88
expires: 2025-05-12T09:15:05.191Z
99
created: 2025-02-02T05:47:18.380Z
10-
SNYK-JS-BABELHELPERS-9397697:
11-
- '*':
12-
reason: This issue is temporarily ignored while we evaluate alternative dependencies or wait for an update from Expo/Metro.
13-
expires: 2025-05-12T09:15:05.191Z
14-
created: 2025-03-12T09:15:05.191Z
15-
SNYK-JS-IMAGESIZE-9634164:
16-
- '*':
17-
reason: This issue is temporarily ignored untill there is a new release of react native fixed this issue.
18-
expires: 2025-05-12T09:15:05.191Z
19-
created: 2025-04-07T09:15:05.191Z
2010
snyk:lic:npm:lightningcss-win32-x64-msvc:MPL-2.0:
2111
- '*':
2212
reason: This issue is temporarily ignored while we evaluate alternative dependencies or wait for an update from Expo/Metro.

.yarnrc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ nmHoistingLimits: workspaces
33

44
plugins:
55
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
6-
spec: "@yarnpkg/plugin-interactive-tools"
6+
spec: '@yarnpkg/plugin-interactive-tools'
77
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
8-
spec: "@yarnpkg/plugin-workspace-tools"
8+
spec: '@yarnpkg/plugin-workspace-tools'
99

1010
yarnPath: .yarn/releases/yarn-3.6.1.cjs

A0Auth0.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
1010
s.homepage = package['repository']['baseUrl']
1111
s.license = package['license']
1212
s.authors = package['author']
13-
s.platforms = { :ios => '13.0' }
13+
s.platforms = { :ios => min_ios_version_supported }
1414
s.source = { :git => 'https://github.com/auth0/react-native-auth0.git', :tag => "v#{s.version}" }
1515

1616
s.source_files = 'ios/**/*.{h,m,mm,swift}'

EXAMPLES.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,11 @@ const auth0 = new Auth0({
190190
clientId: 'YOUR_AUTH0_CLIENT_ID',
191191
headers: {
192192
'Accept-Language': 'fr-CA',
193-
'X-Tracking-Id': 'user-tracking-id-123'
194-
}
193+
'X-Tracking-Id': 'user-tracking-id-123',
194+
},
195195
});
196196
```
197197

198-
199198
#### Using custom headers with Auth0Provider component
200199

201200
If you're using the hooks-based approach with Auth0Provider, you can provide headers during initialization:
@@ -209,31 +208,31 @@ import { Auth0Provider } from 'react-native-auth0';
209208
clientId={'YOUR_CLIENT_ID'}
210209
headers={{
211210
'Accept-Language': 'fr-CA',
212-
'X-App-Version': '1.2.3'
211+
'X-App-Version': '1.2.3',
213212
}}
214213
>
215214
<App />
216-
</Auth0Provider>
215+
</Auth0Provider>;
217216
```
218217

219-
220218
#### Set request-specific headers
221219

222220
You can also provide headers for specific API calls, which will override global headers with the same name:
223221

224222
```js
225223
// For specific authentication requests
226-
auth0.auth.passwordRealm({
227-
username: 'info@auth0.com',
228-
password: 'password',
229-
realm: 'myconnection',
230-
headers: {
231-
'X-Custom-Header': 'request-specific-value',
232-
'X-Request-ID': 'unique-request-id-456'
233-
}
234-
})
235-
.then(console.log)
236-
.catch(console.error);
224+
auth0.auth
225+
.passwordRealm({
226+
username: 'info@auth0.com',
227+
password: 'password',
228+
realm: 'myconnection',
229+
headers: {
230+
'X-Custom-Header': 'request-specific-value',
231+
'X-Request-ID': 'unique-request-id-456',
232+
},
233+
})
234+
.then(console.log)
235+
.catch(console.error);
237236
```
238237

239238
## Management API (Users)

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,8 @@ import { Auth0Provider } from 'react-native-auth0';
353353

354354
const App = () => {
355355
return (
356-
<Auth0Provider
357-
domain="YOUR_AUTH0_DOMAIN"
356+
<Auth0Provider
357+
domain="YOUR_AUTH0_DOMAIN"
358358
clientId="YOUR_AUTH0_CLIENT_ID"
359359
headers={{ 'X-Custom-Header': 'custom-value' }}
360360
>
@@ -390,9 +390,10 @@ const auth0 = new Auth0({
390390
clientId: 'YOUR_AUTH0_CLIENT_ID',
391391
headers: {
392392
'X-Custom-Header': 'custom-value',
393-
}
393+
},
394394
});
395395
```
396+
396397
</details>
397398

398399
Then import the hook into a component where you want to get access to the properties and methods for integrating with Auth0:

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
2-
presets: ['module:metro-react-native-babel-preset'],
2+
presets: ['module:@react-native/babel-preset'],
33
sourceMaps: true,
44
};

0 commit comments

Comments
 (0)