-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
10.9.* results in getProfile is not a function with webpack #791
Comments
@sinkpoint we might need how you are bundling lock or a sample we can debug to see why is not a function. |
The same result when building with bower
TypeError: f.default.getProfile is not a function
at t.getProfile (http://192.168.99.100/js/app.min.js?r=R1-ba026f2:23:6505)
at Object.t [as getProfile] (http://192.168.99.100/js/app.min.js?r=R1-ba026f2:41:953)
at t.<anonymous> (http://192.168.99.100/js/app.min.js?r=R1-ba026f2:42:6932)
at http://192.168.99.100/js/app.min.js?r=R1-ba026f2:41:694
at f.$eval (http://192.168.99.100/js/app.min.js?r=R1-ba026f2:28:5581)
at f.$apply (http://192.168.99.100/js/app.min.js?r=R1-ba026f2:28:5814)
at t (http://192.168.99.100/js/app.min.js?r=R1-ba026f2:41:570)
at t.function.e.(anonymous function) (http://192.168.99.100/js/app.min.js?r=R1-ba026f2:41:679)
at t.n.emit (http://192.168.99.100/js/app.min.js?r=R1-ba026f2:22:12416)
at http://192.168.99.100/js/app.min.js?r=R1-ba026f2:8:13980 Linked versions angular-lock#1.0.5 bower_components/angular-lock
├── angular#1.6.1
└── auth0-lock#10.9.1 I bundle it all into one single file app.min.js |
Hi @cuongquay, what @hzalaz meant is that we don't have enough context from your comments to assess what is the issue. Since our blundle is bundling it correctly and the code published in NPM, CDN and Bower exposes that method, we think there might be an issue with your bundler configuration and how are you requiring lock in your app. Can you provide a sample project which only contains the lock usage that reproduces the issue? |
Same problem here. |
I was able to repro, thx @petrvolny. I will push a fix and will release a patch version. Anyway, I suggest you both to use getUserInfo (it receives the access token, not the id_token) instead:
|
@glena Thanks for quick response and for the getUserInfo suggestion. |
I wrote my own $http.get("../tokeninfo?id_token=") to retrieve its profile object. Anyway, thanks for your quick fix. |
we will release the patch soon tho, I will let you know |
Hi, |
Please could the Auth0 team update their website to reflect these changes? The documentation there is outdated, and very misleading. I had this same issue, and by trial and error, made it work by changing the lock version to 10.9.2. I never knew that this version was already out, until i searched and got to this page. For example, in the Quick Start section, we still have this:
instead of this:
Again, Since the upgrade to Angular 2.4.x, & Angular-cli 1.0.0-beta.25.5, this DOES no longer work for Webpack:
Interestingly, there is a workaround that issue by the team, but it is not reflected on the site.
Thanks for your understanding. |
auth0-lock results in
platform.bundle.js:136 Uncaught TypeError: f.default.getProfile is not a function
When bundled with webpack 1
With release 10.9. Problems does not exist with 10.8.1 and earlier
Code snippet:
The text was updated successfully, but these errors were encountered: