nativescript-auth0
nativescript-auth0 copied to clipboard
renewCredentials fails for IOS and Android - OIDC issue
Which platform(s) does your issue occur on?
- Both
- iOS/Android 6.1.0
- emulator
Please, tell us how to recreate the issue in as much detail as possible.
We are able to successfully login, redirect back to the app and store the refreshToken via nativescript-secure-storage. However, when we need to update the accessToken via the renewCredentials method, we are unable to do so.
For Android, we see this in the console:
JS: [Vue warn]: Error in v-on handler (Promise/async): "Error: An error occurred when trying to authenticate with the server."
For IOS, we see this in the console:
[Vue warn]: Error in v-on handler (Promise/async): "Error: {"error":"access_denied","error_description":"Cannot read property 'redirect_uri' of undefined"}"
In the Auth0 Dashboard logs we are getting failures at the renewal. They are basically the same as the IOS error:
Occurred: 2 minutes ago at 2019-10-28 19:05:35.043 UTC
Type: Failed Exchange
Description: Cannot read property 'redirect_uri' of undefined
I can take the demo-vue project and replace the domain and the bundle_identifier strings throughout with our values and that's when the issue starts.
Important
If I change the app in the Auth0 backend (app -> Advanced Settings -> OAuth tab) to NOT be OIDC compliant then I can successfully use the refreshCredentials method and update the accessToken. So, I think the issue is something related to the request coming in not being OIDC compliant and Auth0's API service is rejecting the request.