if access token expired, use refresh token, and get new access + refresh tokens
This commit is contained in:
parent
9172155893
commit
8db0bbb874
12 changed files with 462 additions and 41 deletions
|
|
@ -61,4 +61,8 @@ impl RefreshToken {
|
|||
) -> Result<Option<()>, Error> {
|
||||
Ok(DatabaseRefreshTokens::revoke_all_for_user(conn, user.as_ref()).await?)
|
||||
}
|
||||
|
||||
pub async fn use_token(&self, conn: impl SqliteExecutor<'_>) -> Result<Option<()>, Error> {
|
||||
Ok(DatabaseRefreshTokens::use_token(conn, &self.token).await?)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue