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

Feature/configurable hashing and encoding #336

Conversation

larrycinnabar
Copy link

@larrycinnabar larrycinnabar commented Apr 19, 2022

Problem

Password hashing #️⃣

Password hashing process is hard-coded and can't be modified in any kind. There are cases where we do need control on how password is hashed:

  • Current flow is that user is fetched and then password is checked. But we don't want DB to return user at all, until we are 100% password is right. So we need to first, hash password and query by matching hashed passwords.
  • Other simple example is that application may have some requirements on hashing algorithms.

Confirming/Recovering tokens ✉️

Reasons for unhardcoding this part:

  • For easier and better testing we need ability to mock token, selector, verifier
  • We need tokens to look shorter/prettier for some reason

Problematic part 🔴 :

authboss.go has a public helper function VerifyPassword, that now works only if we use default Hasher. a todo item is left there in comments, explaining the issue

Fixes #319, #288

@aarondl
Copy link
Member

aarondl commented Nov 19, 2023

This has been updated by Stephenafamo and it's been merged! Thank you for your contribution. See #355

@aarondl aarondl closed this Nov 19, 2023
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 this pull request may close these issues.

Add VerifyPassword() method to users
2 participants