auth0 / angular-lock

MIT License
18 stars 15 forks source link

auth0 is not defined; but Auth0 is! #21

Closed patoncrispy closed 7 years ago

patoncrispy commented 7 years ago

Using angular-lock@2.0.0-beta.0 and calling lock.interceptHash() in my .run method, I get an exception stating that auth0 is not defined. When I go to the console and see if it exists as a global variable, it is not there, but window.Auth0 and window.Auth0Lock are both there.

I have lock@10.9.2 loaded via CDN and am calling import 'angular-lock' in my entry file (I'm using webpack).

Any ideas what I might be doing wrong?

chenkie commented 7 years ago

Auth0.js doesn't come bundled with Lock anymore, so you'll need to include it on your own. Try including <script src="https://cdn.auth0.com/js/auth0/8.0/auth0.min.js"></script> and see if that fixes it.

patoncrispy commented 7 years ago

That was it. Thanks! That isn't mentioned in any of the tutorials so probably good to mention it somewhere.

chenkie commented 7 years ago

No prob. We have a note here, but I'll add something to the v2 branch readme here as well: https://auth0.com/docs/libraries/lock/v10/auth0js