Skip to content

feat: add password authentication - #12

Merged
vinimachadosantana merged 4 commits into
developfrom
feat/password-authentication
Aug 7, 2026
Merged

feat: add password authentication#12
vinimachadosantana merged 4 commits into
developfrom
feat/password-authentication

Conversation

@vinimachadosantana

Copy link
Copy Markdown
Owner

What

Adds bcrypt password hashing to User and a registration endpoint.

Why

The first half of auth, proving who someone is. Sessions and authorization build on it in the next PRs.

How

  • has_secure_password hashes with bcrypt, which is deliberately slow so brute-forcing a stolen digest is expensive.
  • A 12-character minimum with allow_nil: true, so updating an existing user doesn't demand a password.
  • A spec asserts the response never contains password_digest, proving the serializer allowlist holds.

Testing

  • Model and request specs green, including the 422 contract
  • RuboCop and Brakeman clean

@vinimachadosantana vinimachadosantana self-assigned this Aug 7, 2026
@vinimachadosantana
vinimachadosantana merged commit fc9ab66 into develop Aug 7, 2026
3 checks passed
@vinimachadosantana
vinimachadosantana deleted the feat/password-authentication branch August 7, 2026 10:42
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