Skip to content

Add VerifyPassword() method to users #319

@natefinch

Description

@natefinch

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions