users: set archive status, totp_login_request: use all for user
This commit is contained in:
parent
4bfc8a517f
commit
f82c6368e3
10 changed files with 133 additions and 52 deletions
|
|
@ -33,7 +33,7 @@ pub async fn redirect_page(
|
|||
// Make sure code has not been used
|
||||
if code.has_been_used() {
|
||||
// Revoke all codes and refresh tokens for user
|
||||
code.use_all_for_user(&mut transaction).await?;
|
||||
AuthorizationCode::use_all_for_user(&mut transaction, code.user()).await?;
|
||||
RefreshToken::revoke_all_for_user(&mut transaction, code.user()).await?;
|
||||
|
||||
transaction.commit().await?;
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ pub async fn request_token(
|
|||
// Make sure code has not been used
|
||||
if code.has_been_used() {
|
||||
// Revoke all codes and refresh tokens for user
|
||||
code.use_all_for_user(&mut transaction)
|
||||
AuthorizationCode::use_all_for_user(&mut transaction, code.user())
|
||||
.await
|
||||
.map_err(TokenError::AuthorizationError)?;
|
||||
RefreshToken::revoke_all_for_user(&mut transaction, code.user())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue