-
Notifications
You must be signed in to change notification settings - Fork 176
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
UserApi problem with confirm #147
Comments
Hi @spid3r thanks for reaching out!! Hey so, yes it seems that I will need to improve the regex to avoid other words containing id, like uid. Thanks for contributing with this issue. Cheers!! |
jonathan-casarrubias
pushed a commit
that referenced
this issue
Oct 18, 2016
Merged
jonathan-casarrubias
pushed a commit
that referenced
this issue
Oct 18, 2016
jonathan-casarrubias
pushed a commit
that referenced
this issue
Oct 18, 2016
jonathan-casarrubias
pushed a commit
that referenced
this issue
Oct 18, 2016
jonathan-casarrubias
pushed a commit
that referenced
this issue
Oct 18, 2016
Fixed |
still getting error in userApi.confirm, invalid token, anyone can help ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi guys,
first of all a big shout out to you all for building such a nice SDK for angular2! I love it!
You guys rock!
I found a problem on the UserApi confirm method:
Loopback documentation defines the GET confirm request with 3 query params:
but the generated confirm method in Class UserApi only puts the token and redirect as urlParam and the uid as a route param:
This leads to an error which gets returned by loopback framework when calling the generated confirm method of UserApi:
I think the problem can be found and solved
here in loopback-sdk-builder/lib/angular2/index.js#526: where you want to filter unallowed query params :
urlParams = urlParams.filter(param => (param.arg && !param.arg.match(/(id|fk|data|options|credentials)/g)));
so the filter is being applied to the function argument uid as well which leads to this problem.
Here is the Loopback Model definition of the confirm method:
The text was updated successfully, but these errors were encountered: