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
|
|
@ -96,4 +96,13 @@ impl User {
|
|||
.await?
|
||||
.map(Self::from))
|
||||
}
|
||||
|
||||
pub async fn get_one_from_refresh_token(
|
||||
conn: impl SqliteExecutor<'_>,
|
||||
token: &str,
|
||||
) -> Result<Option<Self>, Error> {
|
||||
Ok(DatabaseUsers::get_one_from_refresh_token(conn, token)
|
||||
.await?
|
||||
.map(Self::from))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue