e7ddd0f72f
Add user authentication infrastructure with login/logout functionality, session management, and basic user model. Changes: - Create users table with email, password_digest, confirmation tokens - Add Users repository with authentication methods - Add User entity with authentication helpers - Implement login form and authentication actions - Add logout action - Add BCrypt gem for password hashing - Update base Action class with authentication helpers - Add login/logout routes Next steps: Registration flow, password reset, email confirmation
40 lines
1.1 KiB
Plaintext
40 lines
1.1 KiB
Plaintext
<div class="auth-container">
|
|
<div class="auth-card">
|
|
<h1>Login</h1>
|
|
|
|
<% if flash[:error] %>
|
|
<div class="alert alert-error"><%= flash[:error] %></div>
|
|
<% end %>
|
|
|
|
<% if flash[:success] %>
|
|
<div class="alert alert-success"><%= flash[:success] %></div>
|
|
<% end %>
|
|
|
|
<form action="/auth/login" method="POST">
|
|
<div class="form-group">
|
|
<label for="email">Email</label>
|
|
<input type="email" id="email" name="email" required autocomplete="email">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="password">Password</label>
|
|
<input type="password" id="password" name="password" required autocomplete="current-password">
|
|
</div>
|
|
|
|
<div class="form-group remember-me">
|
|
<label>
|
|
<input type="checkbox" name="remember" value="1">
|
|
Remember me
|
|
</label>
|
|
</div>
|
|
|
|
<button type="submit" class="btn btn-primary btn-block">Login</button>
|
|
</form>
|
|
|
|
<div class="auth-links">
|
|
<p>Don't have an account? <a href="/register">Register here</a></p>
|
|
<p><a href="/password/reset">Forgot password?</a></p>
|
|
</div>
|
|
</div>
|
|
</div>
|