Skip to content
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

Passwordreset using req.param which is deprecated #21

Open
milanvdm opened this issue May 6, 2015 · 3 comments
Open

Passwordreset using req.param which is deprecated #21

milanvdm opened this issue May 6, 2015 · 3 comments

Comments

@milanvdm
Copy link

milanvdm commented May 6, 2015

Im trying to use the passwordreset but the user keeps on being undefined.

Error log:
Wed, 06 May 2015 02:42:54 GMT express deprecated req.param(name): Use req.params, req.body, or req.query instead at routes/account.api.js:351:18
source: http://expressjs.com/api.html#app.param

This results in activator calling the usermodel with a username undefined.
And therefore, the whole passwordreset system is not working.

@deitch
Copy link
Owner

deitch commented May 6, 2015

Are you using the latest version 1.0.0 or higher? We have a req.param() wrapper so it never actually calls the express deprecated req.param().

@milanvdm
Copy link
Author

milanvdm commented May 6, 2015

I'm using activator 1.0.0.
I'm simply calling the app.post("/api/passwordreset", activator.createPasswordReset);
using the package request with
http://pastebin.com/S0WX6Kct

This results in the login variable to be undefined at:
http://pastebin.com/83HBVuSD

@deitch
Copy link
Owner

deitch commented May 6, 2015

Can you step through it using debug? When it calls createPasswordReset, it should be in L184 of activator.js. L185 then attaches the req.param() override using param(req), which just includes params.js, which never should use the express req.param().

See if it is calling those? I cannot replicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants