auth0 / angular-lock

MIT License
18 stars 15 forks source link

Stub required methods so `auth0-angular` can initialize #10

Closed srogers202 closed 8 years ago

srogers202 commented 8 years ago

Hey guys,

In our Angular app, we are upgrading to Auth0Lock v10. We wanted to still utilize the https://github.com/auth0/auth0-angular module, but just replace the auth.signin call with lock.show.

When we call authProvider.init, we were getting errors saying .getClient and parseHash were required Auth0Lock functions.

Since we aren't using auth0-angular to control the Lock widget, stubbing these functions allowed us to initialize the authProvider and use the route interceptor, signout, and other convenience methods, while using lock to configure and toggle the widget.

I'm not sure if there's a plan to upgrade auth0-angular to work with Lock10, but until then, this is our workaround. Thanks!

chenkie commented 8 years ago

Good call! auth0-angular has been officially deprecated but this will help people upgrade to Lock v10 incrementally. Thanks :)