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

Logins broken with update from 3.1.1 -> 3.1.2/4.0.0 #115

Open
ChrisHubinger opened this issue Jan 15, 2016 · 7 comments
Open

Logins broken with update from 3.1.1 -> 3.1.2/4.0.0 #115

ChrisHubinger opened this issue Jan 15, 2016 · 7 comments

Comments

@ChrisHubinger
Copy link
Contributor

Hi,

user.authenticate() logins do not work anymore with unmodified data & settings after updating from 3.1.1 to 3.1.2 or 4.0.0

needed to recreate passowrd to make it work again - major IMPACT please delete 3.1.2 from NPM in order to avoid people running into this issue.

thx,
Chris

@saintedlama
Copy link
Owner

Added a test in commit 3123649 to verify that the authenticate function is compatible to 3.0.0 versions. Tests are working fine with all node versions > 0.10 - could you check if you specify a digest algorithm argument? Will work on a fix for node 0.10 too.

@saintedlama
Copy link
Owner

Unpublished 3.1.2 and 3.1.1

@ChrisHubinger
Copy link
Contributor Author

Hi,

No, we just used the iterations setting (that low to speedup test runs):

    UserSchema.plugin(passportLocalMongoose, {
        iterations: 5000
    });

@alejandromagnorsky
Copy link

If I update to v4.0.0, I can't login with existing users. Working with version 3.1.0 in the meantime.

@BrandonCopley
Copy link

It's because there was a bug that uses sha1 in that version, even though you thought it was defaulting to sha256. It's a silly error, and I am working on adding some features to this code (if the author lets me) so that we can upgrade our users without them seeing a "we reset your password" email.

@BrandonCopley
Copy link

UserSchema.plugin(passportLocalMongoose, {
    iterations: 5000,
    digestAlgorithm: 'sha1'
});

Should work.

@saintedlama
Copy link
Owner

As outlined by @BrandonCopley use a digestAlgorithm: 'sha1' for backward compatibility

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

4 participants