Add change-password API and dynamic 404 redirect

Introduce ChangePasswordRequest DTO and a new ChangePassword endpoint in AuthController that validates input, changes the user's password via UserManager, updates the security stamp, signs out the user to invalidate sessions, and returns localized messages. Add a simple authorized AppUserController stub (GET /auth/user). Update the 404 view to resolve auth status via fetchCurrentUser, show a dynamic CTA/icon (Dashboard vs Home), auto-redirect after a short delay with proper timer cleanup, and adjust navigation behavior. Update codexInfo.md to document the 404 behavior change.
This commit is contained in:
Jonas
2026-04-20 19:39:43 +02:00
parent f830fe4967
commit bd261b6868
5 changed files with 146 additions and 6 deletions
@@ -0,0 +1,14 @@
using System.ComponentModel.DataAnnotations;
namespace API.Contracts.Auth
{
public class ChangePasswordRequest
{
[Required]
public string OldPassword { get; set; } = string.Empty;
[Required]
public string NewPassword { get; set; } = string.Empty;
[Required]
public string NewPasswordConfirm { get; set; } = string.Empty;
}
}