add logout for refreshTokens
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 8s
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 8s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user