Skip to content

Conversation

@gapple
Copy link

@gapple gapple commented Nov 18, 2025

If hash settings are changed, such as increasing the scrypt cost parameter, stored hash values are not updated until the user changes their password and a new hash is calculated with the new configuration and plaintext password.
Checking the parameters of the hashed password against the current configuration on successful login allows proactively replacing the stored hash of the user's existing plaintext password.

This would also assist in migrating hashes to a different algorithm, if verifyPassword() was made algorithm-aware. Existing hashes would be checked against the algorithm that created them, but hashPassword() and passwordNeedsReHash() would only need to use the current configuration values.

@gapple gapple changed the title Add utility for checking outdated password hashes during login flow feta: Add utility for checking outdated password hashes during login flow Nov 18, 2025
@gapple gapple changed the title feta: Add utility for checking outdated password hashes during login flow feat: Add utility for checking outdated password hashes during login flow Nov 18, 2025
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.

1 participant