Test refresh tokens and don't refresh them if user doesn't exist anymore
This commit is contained in:
@@ -51,6 +51,9 @@ fun Routing.auth(kodein: Kodein) {
|
||||
return@post call.respondStatus(HttpStatusCode.Unauthorized)
|
||||
}
|
||||
|
||||
if (!userService.userExists(id))
|
||||
return@post call.respondStatus(HttpStatusCode.Unauthorized)
|
||||
|
||||
val response = DualToken(
|
||||
token = authSimpleJwt.sign(id),
|
||||
refreshToken = refreshSimpleJwt.sign(id)
|
||||
|
||||
Reference in New Issue
Block a user