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

Add VerifyPassword() method to users #319

Open
natefinch opened this issue Jan 15, 2021 · 1 comment
Open

Add VerifyPassword() method to users #319

natefinch opened this issue Jan 15, 2021 · 1 comment

Comments

@natefinch
Copy link

We're using authboss at Mattel, but we need to be able to support multiple types of password hashing. There's two reasons for this functionality - first is that we want to upgrade our hashing mechanism to argon2. But we have existing hashes in the field that are bcrypt, so we'll need to support both. And, we're migrating users from other systems that use other hashing mechanisms, and so we want to be able to support those as well.

If instead of explicitly calling bcrypt in login etc, authboss first checked if the user supports a VerifyPassword() method, then it could call that instead, and implementors could choose their own method of hashing.

This would also allow us to incrementally strengthen our hash strength (bcrypt's "cost") as time goes on, and re-save the hash with the new cost as needed.

Right now we're working on doing this by just hacking copied portions of authboss, but we'd rather contribute upstream.

@aarondl
Copy link
Member

aarondl commented Jan 17, 2021

As long as it's all done via optional interfaces as you're suggesting I think this is an easily acceptable proposal as it wouldn't be breaking and provides reasonably interesting functionality to users. Increasing bcrypt cost over time as a supported use case is interesting and I also wonder if there's currently any sources that would advocate increasing it authboss itself for security reasons.

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

Successfully merging a pull request may close this issue.

2 participants