diff --git a/CHANGELOG.md b/CHANGELOG.md index 1500b974..baa1f98c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Change Log +## [v1.5.0](https://github.com/auth0/react-native-auth0/tree/v1.5.0) (2019-07-15) + +[Full Changelog](https://github.com/auth0/react-native-auth0/compare/v1.4.2...v1.5.0) + +**Changed** + +- Enable WebAuth Logout for Android & Fix iOS Logout. [\#223](https://github.com/auth0/react-native-auth0/pull/223) ([lbalmaceda](https://github.com/lbalmaceda)) + +**Fixed** + +- Fix error handling by using authentication error class [\#228](https://github.com/auth0/react-native-auth0/pull/228) ([lbalmaceda](https://github.com/lbalmaceda)) + ## [v1.4.2](https://github.com/auth0/react-native-auth0/tree/v1.4.2) (2019-04-24) [Full Changelog](https://github.com/auth0/react-native-auth0/compare/v1.4.2...v1.4.2) diff --git a/docs/Auth.html b/docs/Auth.html index a002fc7a..9d5288b4 100644 --- a/docs/Auth.html +++ b/docs/Auth.html @@ -2638,7 +2638,7 @@
Removes Auth0 session and optionally remove the Identity Provider session.
- In iOS it will use SFSafariViewController
Removes Auth0 session and optionally remove the Identity Provider session.
+ In iOS it will use SFSafariViewController
and in Android Chrome Custom Tabs.
Install Or via yarn then you need to link the native module in This section is for those that want to use WebAuth, if you dont need it just ignore this section. This section is for those that want to use Web Authentication, if you dont need it just ignore this section. In the file Inside the The The value For more info please read react native docs Callback URLs are the URLs that Auth0 invokes after the authentication process. Auth0 routes your application back to this URL and appends additional parameters to it, including a token. Since callback URLs can be manipulated, you will need to add this URL to your Application's Allowed Callback URLs for security. This will enable Auth0 to recognize these URLs as valid. If omitted, authentication will not be successful. Callback URLs are the URLs that Auth0 invokes after t
Go to the Auth0 Dashboard, select your application and make sure that Allowed Callback URLs contains the following: This snippet sets the Since June 2017 new Clients no longer have the Password Grant Type* enabled by default.
+ Since June 2017 new Clients no longer have the Password Grant Type* enabled by default.
If you are accessing a Database Connection using react-native-auth0
using npm install react-native-auth0 --save
yarn add react-native-auth0
react-native-auth0
react-native link react-native-auth0
Configuration
-
Android
android/app/src/main/AndroidManifest.xml
you must make sure the MainActivity of the app has a launchMode value of singleTask
and that it has the following intent filter:<intent-filter>
@@ -120,6 +120,8 @@
iOS
ios
folder find the file AppDelegat
</array>
<string>
value should be the literal value of the Bundle Identifier with no $ variables, for example: samples.auth0.com
.
+org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
is the default for apps created with React Native CLI, you may have a different value.
Callback URL(s)
Callback URL(s)
iOS
{YOUR_BUNDLE_IDENTIFIER}://${YOUR_AUTH0_DOMAIN}/ios/{YOUR_BUNDLE_IDENTIFIER}/callback
Android
{YOUR_APP_PACKAGE_NAME}://{YOUR_AUTH0_DOMAIN}/android/{YOUR_APP_PACKAGE_NAME}/callback
Usage
import Auth0 from 'react-native-auth0';
-const auth0 = new Auth0({ domain: '{YOUR_AUTH0_DOMAIN}', clientId: '{YOUR_CLIENT_ID}' });
WebAuth
auth0
+const auth0 = new Auth0({ domain: '{YOUR_AUTH0_DOMAIN}', clientId: '{YOUR_CLIENT_ID}' });
Web Authentication
Log in
auth0
.webAuth
.authorize({scope: 'openid email', audience: 'https://{YOUR_AUTH0_DOMAIN}/userinfo'})
.then(credentials => console.log(credentials))
.catch(error => console.log(error));
-audience
to ensure OIDC compliant responses, this can also be achieved by enabling the OIDC Conformant switch in your Auth0 dashboard under Application / Settings / Advanced OAuth
. For more information please check this documentation.Authentication API
Important: Database Connection Authentication
Log out
auth0
+ .webAuth
+ .clearSession()
+ .catch(error => console.log(error));
Authentication API
Important: Database Connection Authentication
passwordRealm
then you will need to enable the Password Grant Type, please follow this guide.Login with Password Realm Grant
auth0
.auth
@@ -192,7 +197,7 @@
License