Some random stuff tbh

This commit is contained in:
Jef Roosens 2021-09-05 09:59:16 +02:00
parent a6b1b0ff76
commit a295237863
Signed by: Jef Roosens
GPG key ID: 955C0660072F691F
5 changed files with 64 additions and 6 deletions

View file

@ -99,6 +99,11 @@ pub fn refresh_token(
return Err(RbError::AuthDuplicateRefreshToken);
}
// Then we check if the user is blocked
if user.blocked {
return Err(RbError::AuthBlockedUser);
}
// Now we check if the token has already expired
let cur_time = Utc::now().naive_utc();