I followed the very helpful tutorial on Ionic 2 and Auth0 here: http://blog.ionic.io/ionic-2-and-auth0/
However, I am getting an error: Cannot find Auth0Lock in auth.ts
I do have the “declare var Auth0Lock: any;” that should prevent this, but it doesn’t seem to work.
Any ideas?
Thanks!
Same here… I contacted AuthO about it and received following response:
Hi Matt,
We are working on fixing this issue.
In the mean time I can provide you a work around to get the seed project.
Link to the repo,
You would have to configure your credentials (Client-secret and client-id) in app/services/auth/auth.ts
Let us know if you have any more questions.
Cheers,
Vikas Jayaram.
Developer Success Engineer
Double-check if you added the Auth0 script in index.html
.
Otherwise you can try to install the Auth0 definitions:
typings install auth0.lock --ambient --save
NOTE: If you don’t have typings
installed then you have to install it first:
npm install typings -g
Thanks for the thoughts. Yes, I did add the script to index.html
And also tried the repo mentioned above, but didn’t work correctly.
It appears that Ionic 2 is still in flux, so the auth0 has to respond to a lot of the changes. Hopefully a fix comes out soon
doorty
5
+1
Would like to see working auth example
+1
Has anybody found a workaround for this already?
vaibsVB
7
Try these two lines below the import
statements in the auth.service.ts
file.
declare var Auth0: any;
declare var Auth0Lock: any;