Error message: cannot read property 'onRedirectUri' of undefined

Good morning,

I have implemented in an IONIC 3 application (set to native). Everything was working, but it has stopped working. I have made changes, but believe i’ve undone everything i did prior to the breakdown.

The error message I get is “user canceled” and if I enable livereload, an additional message is briefly visible that says "cannot read property ‘onRedirectUri’ of undefined. Both are exceptions thrown by the login() function in auth.service.ts.

The variable that is undefined seems to be authResult.

The logs in Auth0 say that the authentication was successful.

Can somebody point me in the right direction?

My import was wrong, after changing

import { Auth0Cordova } from ‘@auth0/cordova’;


import Auth0Cordova from ‘@auth0/cordova’;

It was working! Remove the curly braces {}

As explained here: TypeScript - difference between import ... and import {...} (with curly braces) - Stack Overflow and here: Auth0 Cordova Debugging Help - #3 by brianra

Hope it helps somebody else

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.