Skip to content

Commit

Permalink
clarify pods install step and logout callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
lbalmaceda committed Sep 27, 2019
1 parent bf047ab commit 56af46a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ The contents of previous release can be found on the [branch v1](https://github.

## Getting started

First install the native library module:

Using [npm](https://www.npmjs.com)

`$ npm install react-native-auth0 --save`
Expand All @@ -33,13 +35,17 @@ or [yarn](https://yarnpkg.com/en/)

`$ yarn add react-native-auth0`

Then, you need to run the following command to install the ios app pods with Cocoapods. That will auto-link the library.

`$ cd ios && pod install`

### Configuration

You need make your Android and iOS applications aware that an authentication result will be received from the browser. Each platform has its own set of instructions.

#### Android

Open the `AndroidManifest.xml` file of your application typically at `android/app/src/main/AndroidManifest.xml` and make sure the Activity on which you're going to receive the authentication result has a **launchMode** of `singleTask`. Additionally inside this Activity definition include the following intent filter.
Open the `AndroidManifest.xml` file of your application typically at `android/app/src/main/AndroidManifest.xml` and **make sure** the Activity on which you're going to receive the authentication result has a **launchMode** of `singleTask`. Additionally inside this Activity definition include the following intent filter.

```xml
<intent-filter>
Expand Down Expand Up @@ -134,7 +140,9 @@ Callback URLs are the URLs that Auth0 invokes after the authentication process.

> Callback URLs must have a valid scheme value as defined by the [specification](https://tools.ietf.org/html/rfc3986#page-17). Note however that platforms like Android don't follow this RFC and define the scheme and host values as case-sensitive. Since this SDK makes use of the Android's Package Name and its analogous iOS's Product Bundle Identifier to generate the redirect URL, it's advised to use lower case values for such. A "Redirect URI is not valid" error will raise if this format is not respected.
Go to the [Auth0 Dashboard](https://manage.auth0.com/#/applications), select your application and make sure that **Allowed Callback URLs** contains the following:
Go to the [Auth0 Dashboard](https://manage.auth0.com/#/applications), select your application and make sure that **Allowed Callback URLs** contains the URLs defined below.

If in addition you plan to use the log out method, you must also add these URLs to the **Allowed Logout URLs**.

#### Android

Expand Down

0 comments on commit 56af46a

Please sign in to comment.