test(auth): prove email token lifecycle
CI and Deploy / test (pull_request) Successful in 5m18s
CI and Deploy / deploy (pull_request) Has been skipped

Reject verification-link replay and cover real Identity token expiry, replay, email change, and custom username preservation on SQLite.
This commit is contained in:
cesnimda
2026-08-15 20:06:08 +02:00
parent 134aac7bcf
commit dc511296a4
5 changed files with 158 additions and 3 deletions
+1 -1
View File
@@ -1019,7 +1019,7 @@ public sealed class AuthController : ControllerBase
if (token.Length == 0) return BadRequest("Token is required.");
var user = await _users.FindByIdAsync(userId);
if (user is null) return BadRequest("Invalid or expired link.");
if (user is null || user.EmailConfirmed) return BadRequest("Invalid or expired link.");
var res = await _users.ConfirmEmailAsync(user, token);
if (!res.Succeeded)