Hi @oussamah,
In Android devices this issue can happen sometimes if the https schema is set to be handled by default using a browser. In some devices it will prompt the user with a “Open application with…” and give you a list of apps that you can open it with. If you happen to select the browser, it will try to open ‘https://subdomain.eu.auth0.com/android/com.{applicationId}/callback’ which will fail since what you want is really to return to the app.
Changing the scheme will prevent the browser from getting the request since it will not be registered to handle your custom scheme. You can give it a try by updating the auth0Scheme Manifest Placeholder on the app/build.gradle
and calling .withScheme() on your .login() and logout() methods.
app/build.gradle:
android {
(...)
defaultConfig {
(...)
manifestPlaceholders = [auth0Domain: "@string/com_auth0_domain", auth0Scheme: "demo"]
}
login:
WebAuthProvider.login(auth0)
.withScheme("demo")
.start(...)
logout:
WebAuthProvider.logout(auth0)
.withScheme("demo")
.start(...)
Using something other than https might help since when the request for demo://subdomain.eu.auth0.com/android/com.{applicationId}/callback is issued, the browser will not try to pick it up and it will go directly to your app.
You can find more info on this here: