Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge vNext into Master #691

Merged
merged 42 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
881996e
[SDK-3870] Typescript Migration (#628)
poovamraj Jun 5, 2023
92e8417
[SDK-4173] Remove type in credentials object (#633)
poovamraj Jun 5, 2023
b1a5c76
Add support for all Auth login methods in useAuth0 hook (#579)
sqiou11 Jun 5, 2023
ac15186
[SDK-3885] Expo plugin update (#638)
poovamraj Jun 20, 2023
1992d9c
[SDK-3598] RNA sample app (#639)
poovamraj Jun 20, 2023
ffacae4
Generate Doc with internal modules
poovamraj Jun 22, 2023
fb417bf
chore: remove jsdoc dependencies
stevehobbsdev Jun 19, 2023
8b1eeb1
chore: ignore build-time folders
stevehobbsdev Jun 19, 2023
8098d61
chore: remove out from git cache
stevehobbsdev Jun 19, 2023
09282dc
[SDK-4289] Migrate to TypeDoc for documentation generation (#655)
stevehobbsdev Jun 22, 2023
60832ee
[SDK-4355] iOS Native Code Migration (#654)
poovamraj Jun 23, 2023
12d97a5
[SDK-3881] Fix expo scheme clash issue (#658)
poovamraj Jun 27, 2023
27df5cb
[SDK-4356] Documentation fixes (#659)
stevehobbsdev Jul 5, 2023
0e3a4ff
chore: fix docs build script
stevehobbsdev Jul 6, 2023
0fc572e
chore: fix docs build script (#663)
stevehobbsdev Jul 6, 2023
5506563
[SDK-4365] Return credentials for authorize methods (#662)
poovamraj Jul 6, 2023
5d754a1
Add redirect URL to iOS login - new scheme changes (#664)
poovamraj Jul 7, 2023
45a02ce
[SDK-4379] Readme / migration guide tweaks (#661)
stevehobbsdev Jul 7, 2023
170164a
v3 Release prep (#665)
poovamraj Jul 7, 2023
68076ed
Release v3.0.0-beta.0 (#666)
poovamraj Jul 7, 2023
1662f32
Trigger Build
poovamraj Jul 7, 2023
18c8603
Update config.yml
poovamraj Jul 7, 2023
c3d6277
Add node publish version
poovamraj Jul 7, 2023
cbfae0f
Update orb version
poovamraj Jul 7, 2023
173a5cb
Update config.yml
poovamraj Jul 7, 2023
9535708
Update config.yml
poovamraj Jul 7, 2023
91b326d
Update config.yml
poovamraj Jul 7, 2023
0f01d03
Add missing documentation for `useAuth0`
poovamraj Jul 7, 2023
b288b3e
Add missing index file from packing (#667)
poovamraj Jul 7, 2023
34d8c5d
Update README.md
poovamraj Jul 7, 2023
6503c5d
Release v3.0.0-beta.1 (#668)
poovamraj Jul 7, 2023
54497a3
Release v3.0.0-beta.1 (#669)
poovamraj Jul 7, 2023
76f338c
Fix Expo Plugin Export (#671)
poovamraj Jul 10, 2023
04157b2
Release v3.0.0 beta.2 (#672)
poovamraj Jul 10, 2023
e266aba
Export types as part of root (#676)
poovamraj Jul 11, 2023
a2539d5
Release v3.0.0-beta.3 (#677)
poovamraj Jul 11, 2023
900ce76
[SDK-4416] Support Organisation Name (#681)
poovamraj Jul 26, 2023
47b34b2
Fix `expiresIn` in iOS has an incorrect value (#686)
poovamraj Aug 8, 2023
ac5d835
Rename expires in to expires at (#688)
poovamraj Aug 10, 2023
19cb61b
Update from master (#690)
poovamraj Aug 10, 2023
c60e89c
Merge branch 'master' into vnext
poovamraj Aug 10, 2023
ab0298a
Update yarn.lock
poovamraj Aug 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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