James Whittaker
Posts: 0
Joined: Tue Feb 17, 2015 2:14 pm

Auth0 plugin - Auth0Lock is undefined

HI I have aded the auth0 plugin from the menu option, when i try to run the initial page, i get an undefined error for this line:
lock = new Auth0Lock(Auth0_Settings.client_id, Auth0_Settings.domain);

any ideas?

Ihor Didevych
Posts: 0
Joined: Wed Nov 19, 2014 7:55 pm

Auth0 plugin - Auth0Lock is undefined

Hi James,

Do you define client id and domain in Auth0_Settings? This process is described here http://devcenter.appery.io/documentat...

James Whittaker
Posts: 0
Joined: Tue Feb 17, 2015 2:14 pm

Auth0 plugin - Auth0Lock is undefined

HI, thanks for the reply. I did yes all 3 are set.

It looks like a javascript error, that code runs in the Load event on the Auth0_Home page.

Chrome dev tools tell me it is : Uncaught ReferenceError: Auth0Lock is not defined

When i run it in my phone on the testing app, i just see the spinner...

James Whittaker
Posts: 0
Joined: Tue Feb 17, 2015 2:14 pm

Auth0 plugin - Auth0Lock is undefined

I have progressed a bitI had to import the JS file from here:

James Whittaker
Posts: 0
Joined: Tue Feb 17, 2015 2:14 pm

Auth0 plugin - Auth0Lock is undefined

should this not be referenced automatically or did i miss something in a tutorial?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Auth0 plugin - Auth0Lock is undefined

Hello James!

You are right! We are about to publish an updated tutorial.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Auth0 plugin - Auth0Lock is undefined

Actually just published :)

James Whittaker
Posts: 0
Joined: Tue Feb 17, 2015 2:14 pm

Auth0 plugin - Auth0Lock is undefined

ah ok that makes a bit more sense. I have done those changes, when I get authorised on a device now it just returns me to the auth0 popup.... and does not redirect... ?

Let me re-read that tutorial and double check..

Thanks

James Whittaker
Posts: 0
Joined: Tue Feb 17, 2015 2:14 pm

Auth0 plugin - Auth0Lock is undefined

Hi

I have double checked and think i have everything as per the new tutotrial. It works in the browser, however on the device, in the appery test app, the auth process works (i can see that in the auth0 logs), however after the auth i just see the auth0 logon popup on the screen there is no redirect? thanks James

Return to “Issues”