Skip to content

Commit

Permalink
remove webview references from the readme.md file
Browse files Browse the repository at this point in the history
  • Loading branch information
lbalmaceda committed Oct 14, 2016
1 parent 5f561fb commit 797c4ed
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,39 +244,6 @@ First go to [Auth0 Dashboard](https://manage.auth0.com/#/applications) and go to
https://{YOUR_AUTH0_DOMAIN}/android/{YOUR_APP_PACKAGE_NAME}/callback
```

#### Configuration: Using the WebView

Open your app's `AndroidManifest.xml` file and add the following permissions.

```xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
```

> The `ACCESS_NETWORK_STATE` permission it's not mandatory, but used by the WebAuthActivity to check for internet availability before executing a request.
Also register the WebAuthActivity inside the `application` tag like


```xml
<application android:theme="@style/AppTheme">

<!-- ... -->

<activity
android:name="com.auth0.android.provider.WebAuthActivity"
android:theme="@style/MyAppTheme"/>

<!-- ... -->

</application>
```

Finally, define a constant like `WEB_REQ_CODE` that holds the request code (an `int`), that will be sent back with the intent once the authentication is finished in the webview.


#### Configuration: Using the Browser

Open your app's `AndroidManifest.xml` file and add the following permission.

```xml
Expand Down Expand Up @@ -361,16 +328,6 @@ WebAuthProvider.init(account)
.start(MainActivity.this, authCallback, WEB_REQ_CODE);
```

#### Use browser instead of WebView

```java
WebAuthProvider.init(account)
.useBrowser(true)
.start(MainActivity.this, authCallback, WEB_REQ_CODE);
```
> Make sure to check the callback url and manifest configuration explained above.

#### Specify scope

```java
Expand All @@ -393,7 +350,6 @@ WebAuthProvider.init(account)

```java
WebAuthProvider.init(account)
.useBrowser(true)
.start(MainActivity.this, authCallback, WEB_REQ_CODE);
```

Expand Down

0 comments on commit 797c4ed

Please sign in to comment.