add logout for refreshTokens
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 8s

This commit is contained in:
2026-03-22 17:25:15 -05:00
parent 74307e614c
commit 7e02d3cfe1
3 changed files with 14 additions and 6 deletions

View File

@@ -67,10 +67,10 @@ public class AuthController : ControllerBase {
[Authorize] // authorize is handled by middleware
[HttpPost("logout")]
public ActionResult Logout() {
// dummy endpoint
// logout happens upon client-side jwt removal
// TODO: expire all refresh tokens
public async Task<ActionResult> Logout(string refreshTokenString) {
// revoke refresh token
bool success = await jwt_.RevokeRefreshToken(refreshTokenString);
if(!success) return NotFound();
return Ok();
}
@@ -106,7 +106,6 @@ public class AuthController : ControllerBase {
}
// TODO
// refresh tokens
// email verification
// password reset
// oh hell naw 2FA I do not care enough