I have an existing app and am updating it to use the latest Auth0 Cordova plugin. I’m following the latest quickstart. My app does redirect to the hosted login page, and when I log in I do hit the Auth0Cordova.onRedirectUri(url);
method (hooked in from handleOpenURL
. The redirect URL seems valid in that it contains code/state data. Unfortunately the app does nothing once onRedirectUri()
is called. What can I do to troubleshoot why nothing happens from this call?
Can you attach a remote debugger (Chroem/ Safari) and check for network errors?
I got this figured out. I was importing @auth0/cordova like all of my other typescript imports:
import { Auth0Cordova } from '@auth0/cordova';
This didn’t properly import, so it was trying to call onRedirectUri on an undefined object. Changing it to below (same as the quickstart) fixed this for me. Just had to ditch the curly brackets.
import Auth0Cordova from '@auth0/cordova';