diff --git a/README.md b/README.md index b12031b70..f1b0437e4 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,19 @@ And then create a new Auth0 instance by passing an Android Context: Auth0 account = new Auth0(context); ``` +## OIDC Conformant Mode + +It is strongly encouraged that this SDK be used in OIDC Conformant mode. When this mode is enabled, it will force the SDK to use Auth0's current authentication pipeline and will prevent it from reaching legacy endpoints. By default is `false` + +```java +Auth0 account = new Auth0("{YOUR_CLIENT_ID}", "{YOUR_DOMAIN}"); +//Configure the account in OIDC conformant mode +account.setOIDCConformant(true); +//Use the account in the API clients +``` + +Passwordless authentication *cannot be used* with this flag set to `true`. For more information, please see the [OIDC adoption guide](https://auth0.com/docs/api-auth/tutorials/adoption). + ### Authentication API @@ -91,7 +104,7 @@ authentication #### Passwordless Login -This feature requires your client to have the *Resource Owner* Legacy Grant Type enabled. Check [this article](https://auth0.com/docs/clients/client-grant-types) to learn how to enable it. +This feature requires your client to have the *Resource Owner* Legacy Grant Type enabled. Check [this article](https://auth0.com/docs/clients/client-grant-types) to learn how to enable it. Note that Passwordless authentication *cannot be used* with the [OIDC Conformant Mode](#oidc-conformant-mode) enabled. Passwordless it's a 2 steps flow: diff --git a/auth0/src/main/java/com/auth0/android/Auth0.java b/auth0/src/main/java/com/auth0/android/Auth0.java index 934018428..d32932d2a 100755 --- a/auth0/src/main/java/com/auth0/android/Auth0.java +++ b/auth0/src/main/java/com/auth0/android/Auth0.java @@ -40,6 +40,15 @@ *
{@code
  * Auth0 auth0 = new Auth0("YOUR_CLIENT_ID", "YOUR_DOMAIN");
  * }
+ * It is strongly encouraged that this SDK be used in OIDC Conformant mode. + * When this mode is enabled, it will force the SDK to use Auth0's current authentication pipeline + * and will prevent it from reaching legacy endpoints. By default is `false` + *
{@code
+ * auth0.setOIDCConformant(true);
+ * }
+ * For more information, please see the OIDC adoption guide. + * + * @see Auth0#setOIDCConformant(boolean) */ public class Auth0 { @@ -148,9 +157,11 @@ public void doNotSendTelemetry() { } /** - * Defines if the client uses OIDC conformant authentication endpoints. By default is {@code false} + * It is strongly encouraged that this SDK be used in OIDC Conformant mode. + * When this mode is enabled, it will force the SDK to use Auth0's current authentication pipeline + * and will prevent it from reaching legacy endpoints. By default is {@code false} + * For more information, please see the OIDC adoption guide. *

- * You will need to enable this setting in the Auth0 Dashboard first: Go to Account (top right), Account Settings, click Advanced and check the toggle at the bottom. * This setting affects how authentication is performed in the following methods: *

* - * @param enabled if Lock will use the Legacy Auth API or the new OIDC Conformant Auth API. + * @param enabled if Lock will use the Legacy Authentication API or the new OIDC Conformant Authentication API. */ public void setOIDCConformant(boolean enabled) { this.oidcConformant = enabled;