You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(auth): migrate password hashing from bcrypt to Argon2id
Replace has_secure_password with a custom PasswordHasher service backed by Argon2id (m=64MiB, t=3, p=2), following the OWASP preferred profile.
Lazy migration: existing bcrypt digests are verified as-is and silently re-hashed on the next successful login. No schema changes, no forced logouts, clean rollback.
- Add gem argon2 ~> 2.3
- Add Authentication::PasswordHasher with bcrypt/argon2id detection,
rescue BCrypt::Errors::InvalidHash and Argon2::Error, test-env fast
params (m=16, t=1, p=1)
- Add UpgradeablePassword concern used by User and Player
- Remove has_secure_password from User and Player; replicate presence validation and virtual attr explicitly
- Hash via before_validation callback, not in the setter
- Add scripts/benchmark_argon2.rb for pre-deploy calibration
0 commit comments