I am followed the Quick start for React Native and created a Sample App.
App launches and after clicking on login button it opens up Auth0 browser for login/signup.
After Login or Signup it closes the browser and logs access_denied: Unauthorized
However in Logs, it says that it was a successful login.
Following is the code I am using on button click
auth0
.webAuth
.authorize({scope: ‘openid profile email’})
.then(credentials =>
console.log(“Logged In”)
)
.catch(error => console.log(“Error -”,error))
It never goes in Logged in, it falls in catch and gives the error.
Happening on Android (React Native).
My first tap on the login button, it displayed the login screen, I typed in the email and password of the test user, a bottom modal appeared but I think the login screen quickly disappeared, I didn’t see it. Then I saw at the console that there was an error saying “access_denied: Unauthorized”, when I tap on the login button again it will quickly close the login screen and then the same error will be logged on the console. Tapping on Clear session button logs the user out successfully though.
EDIT:
I went to Applications (left sidebar) -> Settings (tab) -> Application Properties and set Application Type to Native after a few minutes, it worked.