Skip to content

Commit 01c6d19

Browse files
poovamrajfrederikprijcksqiou11Evan Simsandrewflo
authored
Merge vNext into Master (#691)
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Frederik Prijck <[email protected]> Co-authored-by: Frederik Prijck <[email protected]> Co-authored-by: Steven Qiou <[email protected]> Co-authored-by: Evan Sims <[email protected]> Co-authored-by: Andrew Flores <[email protected]> Co-authored-by: Rita Zerrizuela <[email protected]> Co-authored-by: Steve Hobbs <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 71a5e92 commit 01c6d19

File tree

281 files changed

+70688
-35658
lines changed

Some content is hidden

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

281 files changed

+70688
-35658
lines changed

.circleci/config.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
version: 2.1
22

33
orbs:
4-
ship: auth0/ship@0.7.1
4+
ship: auth0/ship@0
55
codecov: codecov/codecov@3
66

77
jobs:
88
build:
99
executor:
1010
name: ship/node
11-
tag: 16.10.0
11+
tag: 18.16.0
1212
steps:
1313
- checkout
1414
- ship/node-install-packages:
@@ -22,7 +22,9 @@ workflows:
2222
jobs:
2323
- build
2424
- ship/node-publish:
25+
node-version: 18.16.0
2526
pkg-manager: yarn
27+
publish-command: npm publish --tag v3-beta
2628
requires:
2729
- build
2830
context:
@@ -32,3 +34,4 @@ workflows:
3234
branches:
3335
only:
3436
- master
37+
- vnext

.github/ISSUE_TEMPLATE/Bug Report.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: 🐞 Report a bug
22
description: Have you found a bug or issue? Create a bug report for this library
3-
labels: ["bug"]
3+
labels: ['bug']
44

55
body:
66
- type: markdown

.github/ISSUE_TEMPLATE/Feature Request.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: 🧩 Feature request
22
description: Suggest an idea or a feature for this library
3-
labels: ["feature request"]
3+
labels: ['feature request']
44

55
body:
66
- type: checkboxes

.gitignore

+32-25
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
#
33
.DS_Store
44

5+
# XDE
6+
.expo/
7+
8+
# VSCode
9+
.vscode/
10+
jsconfig.json
11+
512
# Xcode
613
#
714
build/
@@ -22,46 +29,46 @@ DerivedData
2229
*.xcuserstate
2330
project.xcworkspace
2431

25-
# Android/IntelliJ
32+
# Android/IJ
2633
#
27-
build/
28-
.idea
34+
.classpath
35+
.cxx
2936
.gradle
37+
.idea
38+
.project
39+
.settings
3040
local.properties
31-
*.iml
41+
android.iml
42+
43+
# Cocoapods
44+
#
45+
example/ios/Pods
46+
47+
# Ruby
48+
example/vendor/
3249

3350
# node.js
3451
#
3552
node_modules/
3653
npm-debug.log
54+
yarn-debug.log
3755
yarn-error.log
3856

3957
# BUCK
4058
buck-out/
4159
\.buckd/
42-
*.keystore
43-
44-
# fastlane
45-
#
46-
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47-
# screenshots whenever they are needed.
48-
# For more information about the recommended setup visit:
49-
# https://docs.fastlane.tools/best-practices/source-control/
50-
51-
*/fastlane/report.xml
52-
*/fastlane/Preview.html
53-
*/fastlane/screenshots
60+
android/app/libs
61+
android/keystores/debug.keystore
5462

55-
# Bundle artifact
56-
*.jsbundle
63+
# Expo
64+
.expo/
5765

58-
# CocoaPods
59-
/ios/Pods/
66+
# Turborepo
67+
.turbo/
6068

61-
# Coverage
62-
coverage/
69+
# generated by bob
70+
lib/
6371

64-
# Temp files
72+
# Other
73+
dist/
6574
out/
66-
67-
plugin/build

.jsdoc.json

-24
This file was deleted.

.shiprc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"files": {
3-
"src/networking/telemetry.js": []
3+
"src/networking/telemetry.ts": []
44
},
55
"postbump": "node scripts/jsdocs.js"
66
}

.watchmanconfig

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

.yarnrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Override Yarn command so we can automatically setup the repo on running `yarn`
2+
3+
yarn-path "scripts/bootstrap.js"

A0Auth0.podspec

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ Pod::Spec.new do |s|
99
s.homepage = package['repository']['baseUrl']
1010
s.license = package['license']
1111
s.authors = package['author']
12-
s.platforms = { :ios => '12.0' }
12+
s.platforms = { :ios => '13.0' }
1313
s.source = { :git => 'https://github.com/auth0/react-native-auth0.git', :tag => "v#{s.version}" }
1414

1515
s.source_files = 'ios/**/*.{h,m,mm,swift}'
1616
s.pod_target_xcconfig = { 'HEADER_SEARCH_PATHS' => "'${PODS_CONFIGURATION_BUILD_DIR}/#{s.name}/#{s.name}.framework/Headers'" }
1717
s.requires_arc = true
1818

1919
s.dependency 'React-Core'
20-
s.dependency 'Auth0', '2.3.2'
21-
s.dependency 'JWTDecode', '3.0.1'
22-
s.dependency 'SimpleKeychain', '1.0.1'
20+
s.dependency 'Auth0', '2.5.0'
21+
s.dependency 'JWTDecode', '3.1.0'
22+
s.dependency 'SimpleKeychain', '1.1.0'
2323
end

CHANGELOG.md

+46-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,50 @@
11
# Change Log
22

3+
## [v3.0.0-beta.3](https://github.com/auth0/react-native-auth0/tree/v3.0.0-beta.3) (2023-07-11)
4+
5+
[Full Changelog](https://github.com/auth0/react-native-auth0/compare/v3.0.0-beta.2...v3.0.0-beta.3)
6+
7+
**Added**
8+
9+
- Export types as part of root [\#649](https://github.com/auth0/react-native-auth0/pull/676) ([poovamraj](https://github.com/poovamraj))
10+
11+
## [v3.0.0-beta.2](https://github.com/auth0/react-native-auth0/tree/v3.0.0-beta.2) (2023-07-10)
12+
13+
[Full Changelog](https://github.com/auth0/react-native-auth0/compare/v2.17.4...v3.0.0-beta.2)
14+
15+
💡 Check the [Migration Guide](MIGRATION_GUIDE.md) to understand the changes required to migrate your application to v3.
16+
17+
**Added**
18+
19+
- \Credentials are returned as part of authorize methods in hooks
20+
- Added sample app in the repository
21+
- Expo plugin is updated to latest version
22+
- Added 'openid profile email' as mandatory scopes
23+
- Option to `forceRefresh` is added in `getCredentials`
24+
- Added `hasValidCredentials` to hooks
25+
- More options to authorize using Hooks
26+
- `authorizeWithSMS`
27+
- `authorizeWithEmail`
28+
- `authorizeWithOOB`
29+
- `authorizeWithOTP`
30+
- `authorizeWithRecoveryCode`
31+
32+
**Changed**
33+
34+
- Custom Scheme is now optional in Expo
35+
- Migrated the codebase to Typescript
36+
- Use Native SDKs ([Auth0.Android](https://github.com/auth0/Auth0.Android/) and [Auth0.Swift](https://github.com/auth0/Auth0.Swift)) for Web Authentication
37+
- `Credentials` object in Android will return `expiresIn` instead of `expiresAt`
38+
- `max_age` parameter is changed to `maxAge` in `WebAuth.authorize()`
39+
- `customScheme` is now part of `ClearSessionOptions` instead of `ClearSessionParameters` in `clearSession`
40+
- Minimum supported version for iOS is bumped to 13
41+
- Revoke Token and Change Password now return `void` instead of an empty object
42+
43+
**Removed**
44+
45+
- Removed the `type` property returned in the `Credentials` object in Android. Use `tokenType` instead.
46+
- `skipLegacyListener` has been removed in `authorize` and `clearSession`
47+
348
## [v2.17.4](https://github.com/auth0/react-native-auth0/tree/v2.17.4) (2023-06-15)
449

550
[Full Changelog](https://github.com/auth0/react-native-auth0/compare/v2.17.3...v2.17.4)
@@ -656,7 +701,7 @@ const auth0 = new Auth0({
656701

657702
```js
658703
auth0.webAuth
659-
.authorize({scope: 'openid email'})
704+
.authorize({ scope: 'openid email' })
660705
.then((credentials) => console.log(credentials))
661706
.catch((error) => console.log(error));
662707
```

DEVELOPMENT.md

-25
This file was deleted.

EXAMPLES.md

+18-17
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ auth0.auth
4848

4949
```js
5050
auth0.auth
51-
.userInfo({token: 'the user access_token'})
51+
.userInfo({ token: 'the user access_token' })
5252
.then(console.log)
5353
.catch(console.error);
5454
```
@@ -59,19 +59,17 @@ This endpoint requires an access token that was granted the `/userinfo` audience
5959

6060
```js
6161
auth0.auth
62-
.refreshToken({refreshToken: 'the user refresh_token'})
62+
.refreshToken({ refreshToken: 'the user refresh_token' })
6363
.then(console.log)
6464
.catch(console.error);
6565
```
6666

6767
### Using custom scheme for web authentication redirection
6868

69-
Custom Schemes can be used for redirecting to the React Native application after web authentication. Using this is <strong>mandatory</strong> for Expo applications.
69+
Custom Schemes can be used for redirecting to the React Native application after web authentication:
7070

7171
```js
72-
authorize({}, {customScheme: 'auth0'})
73-
.then(console.log)
74-
.catch(console.error);
72+
authorize({}, { customScheme: 'auth0' }).then(console.log).catch(console.error);
7573
```
7674

7775
### Login using MFA with One Time Password code
@@ -162,7 +160,10 @@ auth0.auth
162160
```js
163161
auth0
164162
.users('the user access_token')
165-
.patchUser({id: 'user_id', metadata: {first_name: 'John', last_name: 'Doe'}})
163+
.patchUser({
164+
id: 'user_id',
165+
metadata: { first_name: 'John', last_name: 'Doe' },
166+
})
166167
.then(console.log)
167168
.catch(console.error);
168169
```
@@ -171,8 +172,8 @@ auth0
171172

172173
```js
173174
auth0
174-
.users('the user access_token')
175-
.getUser({id: 'user_id'})
175+
.users('{ACCESS_TOKEN}')
176+
.getUser({ id: 'user_id' })
176177
.then(console.log)
177178
.catch(console.error);
178179
```
@@ -190,9 +191,9 @@ Note that Organizations is currently only available to customers on our Enterpri
190191

191192
```js
192193
auth0.webAuth
193-
.authorize({organization: 'organization-id'})
194-
.then(credentials => console.log(credentials))
195-
.catch(error => console.log(error));
194+
.authorize({ organization: 'organization-id' })
195+
.then((credentials) => console.log(credentials))
196+
.catch((error) => console.log(error));
196197
```
197198

198199
### Accept user invitations
@@ -209,8 +210,8 @@ auth0.webAuth
209210
invitationUrl:
210211
'https://myapp.com/login?invitation=inv123&organization=org123',
211212
})
212-
.then(credentials => console.log(credentials))
213-
.catch(error => console.log(error));
213+
.then((credentials) => console.log(credentials))
214+
.catch((error) => console.log(error));
214215
```
215216

216217
If the URL doesn't contain the expected values, an error will be raised through the provided callback.
@@ -231,18 +232,18 @@ auth0.auth
231232
realm: realm,
232233
scope: scope,
233234
})
234-
.then(credentials => {
235+
.then((credentials) => {
235236
// Logged in!
236237
})
237-
.catch(error => {
238+
.catch((error) => {
238239
if (error.name === 'requires_verification') {
239240
auth0.webAuth
240241
.authorize({
241242
connection: realm,
242243
scope: scope,
243244
login_hint: email, // So the user doesn't have to type it again
244245
})
245-
.then(credentials => {
246+
.then((credentials) => {
246247
// Logged in!
247248
})
248249
.catch(console.error);

0 commit comments

Comments
 (0)