Skip to content

Commit

Permalink
Merge vNext into Master (#691)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
9 people authored Aug 10, 2023
1 parent 71a5e92 commit 01c6d19
Show file tree
Hide file tree
Showing 281 changed files with 70,688 additions and 35,658 deletions.
7 changes: 5 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
version: 2.1

orbs:
ship: auth0/ship@0.7.1
ship: auth0/ship@0
codecov: codecov/codecov@3

jobs:
build:
executor:
name: ship/node
tag: 16.10.0
tag: 18.16.0
steps:
- checkout
- ship/node-install-packages:
Expand All @@ -22,7 +22,9 @@ workflows:
jobs:
- build
- ship/node-publish:
node-version: 18.16.0
pkg-manager: yarn
publish-command: npm publish --tag v3-beta
requires:
- build
context:
Expand All @@ -32,3 +34,4 @@ workflows:
branches:
only:
- master
- vnext
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Bug Report.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 🐞 Report a bug
description: Have you found a bug or issue? Create a bug report for this library
labels: ["bug"]
labels: ['bug']

body:
- type: markdown
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Feature Request.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 🧩 Feature request
description: Suggest an idea or a feature for this library
labels: ["feature request"]
labels: ['feature request']

body:
- type: checkboxes
Expand Down
57 changes: 32 additions & 25 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
#
.DS_Store

# XDE
.expo/

# VSCode
.vscode/
jsconfig.json

# Xcode
#
build/
Expand All @@ -22,46 +29,46 @@ DerivedData
*.xcuserstate
project.xcworkspace

# Android/IntelliJ
# Android/IJ
#
build/
.idea
.classpath
.cxx
.gradle
.idea
.project
.settings
local.properties
*.iml
android.iml

# Cocoapods
#
example/ios/Pods

# Ruby
example/vendor/

# node.js
#
node_modules/
npm-debug.log
yarn-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
android/app/libs
android/keystores/debug.keystore

# Bundle artifact
*.jsbundle
# Expo
.expo/

# CocoaPods
/ios/Pods/
# Turborepo
.turbo/

# Coverage
coverage/
# generated by bob
lib/

# Temp files
# Other
dist/
out/

plugin/build
24 changes: 0 additions & 24 deletions .jsdoc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .shiprc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"files": {
"src/networking/telemetry.js": []
"src/networking/telemetry.ts": []
},
"postbump": "node scripts/jsdocs.js"
}
1 change: 1 addition & 0 deletions .watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
3 changes: 3 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Override Yarn command so we can automatically setup the repo on running `yarn`

yarn-path "scripts/bootstrap.js"
8 changes: 4 additions & 4 deletions A0Auth0.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ Pod::Spec.new do |s|
s.homepage = package['repository']['baseUrl']
s.license = package['license']
s.authors = package['author']
s.platforms = { :ios => '12.0' }
s.platforms = { :ios => '13.0' }
s.source = { :git => 'https://github.com/auth0/react-native-auth0.git', :tag => "v#{s.version}" }

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

s.dependency 'React-Core'
s.dependency 'Auth0', '2.3.2'
s.dependency 'JWTDecode', '3.0.1'
s.dependency 'SimpleKeychain', '1.0.1'
s.dependency 'Auth0', '2.5.0'
s.dependency 'JWTDecode', '3.1.0'
s.dependency 'SimpleKeychain', '1.1.0'
end
47 changes: 46 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,50 @@
# Change Log

## [v3.0.0-beta.3](https://github.com/auth0/react-native-auth0/tree/v3.0.0-beta.3) (2023-07-11)

[Full Changelog](https://github.com/auth0/react-native-auth0/compare/v3.0.0-beta.2...v3.0.0-beta.3)

**Added**

- Export types as part of root [\#649](https://github.com/auth0/react-native-auth0/pull/676) ([poovamraj](https://github.com/poovamraj))

## [v3.0.0-beta.2](https://github.com/auth0/react-native-auth0/tree/v3.0.0-beta.2) (2023-07-10)

[Full Changelog](https://github.com/auth0/react-native-auth0/compare/v2.17.4...v3.0.0-beta.2)

💡 Check the [Migration Guide](MIGRATION_GUIDE.md) to understand the changes required to migrate your application to v3.

**Added**

- \Credentials are returned as part of authorize methods in hooks
- Added sample app in the repository
- Expo plugin is updated to latest version
- Added 'openid profile email' as mandatory scopes
- Option to `forceRefresh` is added in `getCredentials`
- Added `hasValidCredentials` to hooks
- More options to authorize using Hooks
- `authorizeWithSMS`
- `authorizeWithEmail`
- `authorizeWithOOB`
- `authorizeWithOTP`
- `authorizeWithRecoveryCode`

**Changed**

- Custom Scheme is now optional in Expo
- Migrated the codebase to Typescript
- Use Native SDKs ([Auth0.Android](https://github.com/auth0/Auth0.Android/) and [Auth0.Swift](https://github.com/auth0/Auth0.Swift)) for Web Authentication
- `Credentials` object in Android will return `expiresIn` instead of `expiresAt`
- `max_age` parameter is changed to `maxAge` in `WebAuth.authorize()`
- `customScheme` is now part of `ClearSessionOptions` instead of `ClearSessionParameters` in `clearSession`
- Minimum supported version for iOS is bumped to 13
- Revoke Token and Change Password now return `void` instead of an empty object

**Removed**

- Removed the `type` property returned in the `Credentials` object in Android. Use `tokenType` instead.
- `skipLegacyListener` has been removed in `authorize` and `clearSession`

## [v2.17.4](https://github.com/auth0/react-native-auth0/tree/v2.17.4) (2023-06-15)

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

```js
auth0.webAuth
.authorize({scope: 'openid email'})
.authorize({ scope: 'openid email' })
.then((credentials) => console.log(credentials))
.catch((error) => console.log(error));
```
25 changes: 0 additions & 25 deletions DEVELOPMENT.md

This file was deleted.

35 changes: 18 additions & 17 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ auth0.auth

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

```js
auth0.auth
.refreshToken({refreshToken: 'the user refresh_token'})
.refreshToken({ refreshToken: 'the user refresh_token' })
.then(console.log)
.catch(console.error);
```

### Using custom scheme for web authentication redirection

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

```js
authorize({}, {customScheme: 'auth0'})
.then(console.log)
.catch(console.error);
authorize({}, { customScheme: 'auth0' }).then(console.log).catch(console.error);
```

### Login using MFA with One Time Password code
Expand Down Expand Up @@ -162,7 +160,10 @@ auth0.auth
```js
auth0
.users('the user access_token')
.patchUser({id: 'user_id', metadata: {first_name: 'John', last_name: 'Doe'}})
.patchUser({
id: 'user_id',
metadata: { first_name: 'John', last_name: 'Doe' },
})
.then(console.log)
.catch(console.error);
```
Expand All @@ -171,8 +172,8 @@ auth0

```js
auth0
.users('the user access_token')
.getUser({id: 'user_id'})
.users('{ACCESS_TOKEN}')
.getUser({ id: 'user_id' })
.then(console.log)
.catch(console.error);
```
Expand All @@ -190,9 +191,9 @@ Note that Organizations is currently only available to customers on our Enterpri

```js
auth0.webAuth
.authorize({organization: 'organization-id'})
.then(credentials => console.log(credentials))
.catch(error => console.log(error));
.authorize({ organization: 'organization-id' })
.then((credentials) => console.log(credentials))
.catch((error) => console.log(error));
```

### Accept user invitations
Expand All @@ -209,8 +210,8 @@ auth0.webAuth
invitationUrl:
'https://myapp.com/login?invitation=inv123&organization=org123',
})
.then(credentials => console.log(credentials))
.catch(error => console.log(error));
.then((credentials) => console.log(credentials))
.catch((error) => console.log(error));
```

If the URL doesn't contain the expected values, an error will be raised through the provided callback.
Expand All @@ -231,18 +232,18 @@ auth0.auth
realm: realm,
scope: scope,
})
.then(credentials => {
.then((credentials) => {
// Logged in!
})
.catch(error => {
.catch((error) => {
if (error.name === 'requires_verification') {
auth0.webAuth
.authorize({
connection: realm,
scope: scope,
login_hint: email, // So the user doesn't have to type it again
})
.then(credentials => {
.then((credentials) => {
// Logged in!
})
.catch(console.error);
Expand Down
Loading

0 comments on commit 01c6d19

Please sign in to comment.