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

Update PKCE usage requirements and errors #239

Merged
merged 2 commits into from
May 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ WebAuthProvider.init(account)

#### Use Code grant with PKCE

> Before you can use `Code Grant` in Android, make sure to go to your [application's section](https://manage.auth0.com/#/applications) in dashboard and check in the Settings that `Client Type` is `Native`.
> To use the `Code Grant` in Android, go to your [Application](https://manage.auth0.com/#/applications) in the dashboard, Settings tab, set `Application Type` to `Native` and `Token Endpoint Authentication Method` to `None`.


```java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ public DatabaseConnectionRequest<Void, AuthenticationException> resetPassword(@N

/**
* Request the revoke of a given refresh_token. Once revoked, the refresh_token cannot be used to obtain new tokens.
* The client must be of type 'Native' or have the 'Token Endpoint Authentication Method' set to 'none' for this endpoint to work.
* Your Auth0 Application Type should be set to 'Native' and Token Endpoint Authentication Method must be set to 'None'.
* Example usage:
* <pre>
* {@code
Expand Down
2 changes: 1 addition & 1 deletion auth0/src/main/java/com/auth0/android/provider/PKCE.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void onSuccess(Credentials payload) {
@Override
public void onFailure(AuthenticationException error) {
if ("Unauthorized".equals(error.getDescription())) {
Log.e(TAG, "Please go to 'https://manage.auth0.com/#/applications/" + apiClient.getClientId() + "/settings' and set 'Client Type' to 'Native' to enable PKCE.");
Log.e(TAG, "Unable to complete authentication with PKCE. PKCE support can be enabled by setting Application Type to 'Native' and Token Endpoint Authentication Method to 'None' for this app at 'https://manage.auth0.com/#/applications/" + apiClient.getClientId() + "/settings'.");
}
callback.onFailure(error);
}
Expand Down