Compare commits

...

1 Commits

Author SHA1 Message Date
3864e17bb0 Work around ambiguous calls 2026-01-13 10:00:08 +01:00

View File

@@ -487,7 +487,7 @@ public class AuthenticationApiController : ControllerBase
await _dbContext.SaveChangesAsync();
}
// Perform sign-in
var userPrincipal = new ClaimsPrincipal(new ClaimsIdentity([new("id", user.Id.ToString())]));
var userPrincipal = new ClaimsPrincipal(new ClaimsIdentity(claims: [new("id", user.Id.ToString())]));
await HttpContext.SignInAsync(userPrincipal);
var token = userPrincipal.FindFirstValue("token")
?? throw new InvalidOperationException("Sign in handler did not add token");
@@ -540,7 +540,7 @@ public class AuthenticationApiController : ControllerBase
// Verify the account
user.EmailVerified = true;
// Create a session
var userPrincipal = new ClaimsPrincipal(new ClaimsIdentity([new("id", user.Id.ToString())]));
var userPrincipal = new ClaimsPrincipal(new ClaimsIdentity(claims: [new("id", user.Id.ToString())]));
await HttpContext.SignInAsync(userPrincipal);
var token = userPrincipal.FindFirstValue("token")
?? throw new InvalidOperationException("Sign in handler did not add token");
@@ -720,7 +720,7 @@ public class AuthenticationApiController : ControllerBase
{
user.EmailVerified = true;
await _dbContext.SaveChangesAsync();
var userPrincipal = new ClaimsPrincipal(new ClaimsIdentity([new("id", user.Id.ToString())]));
var userPrincipal = new ClaimsPrincipal(new ClaimsIdentity(claims: [new("id", user.Id.ToString())]));
await HttpContext.SignInAsync(userPrincipal);
token = userPrincipal.FindFirstValue("token")
?? throw new InvalidOperationException("Sign in handler did not add token");