Commit Graph

2 Commits

Author SHA1 Message Date
f110f26c0b fix: ensure user logout only if logged in
- Update `destroy` action in `SessionsController` to log out
  only if the user is currently logged in.
- Add a check in the `authenticated?` method of the `User`
  model to return false if `remember_digest` is nil.
- Enhance integration tests to simulate logout in another
  browser session and verify that the logout link is not
  present after logging out.

These changes improve the robustness of the session management
by preventing unnecessary logout attempts and ensuring that
authentication checks are more reliable.
2025-01-02 17:17:09 +08:00
cd558466be feat: add user registration functionality
- Add User model with validations for name and email
- Implement UsersController with new action for signup
- Create views for user signup and home page
- Update routes to include signup path
- Add bcrypt gem for password security
- Include tests for user model and controller actions

This commit establishes the foundation for user registration in the application, ensuring proper validation and security measures are in place. It also enhances the user experience by providing a dedicated signup page.
2024-12-31 14:20:22 +08:00