Page 1 of 2

Auth0 plugin - Auth0Lock is undefined

Posted: Tue Feb 17, 2015 2:14 pm
by James Whittaker

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?


Auth0 plugin - Auth0Lock is undefined

Posted: Tue Feb 17, 2015 4:00 pm
by Ihor Didevych

Hi James,

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


Auth0 plugin - Auth0Lock is undefined

Posted: Tue Feb 17, 2015 4:33 pm
by James Whittaker

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...


Auth0 plugin - Auth0Lock is undefined

Posted: Tue Feb 17, 2015 8:46 pm
by James Whittaker

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


Auth0 plugin - Auth0Lock is undefined

Posted: Tue Feb 17, 2015 8:46 pm
by James Whittaker

Auth0 plugin - Auth0Lock is undefined

Posted: Tue Feb 17, 2015 8:50 pm
by James Whittaker

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


Auth0 plugin - Auth0Lock is undefined

Posted: Wed Feb 18, 2015 11:57 am
by Maryna Brodina

Hello James!

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


Auth0 plugin - Auth0Lock is undefined

Posted: Wed Feb 18, 2015 11:58 am
by Maryna Brodina

Actually just published :)


Auth0 plugin - Auth0Lock is undefined

Posted: Wed Feb 18, 2015 12:11 pm
by James Whittaker

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


Auth0 plugin - Auth0Lock is undefined

Posted: Wed Feb 18, 2015 12:20 pm
by James Whittaker

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