ezidam: oauth: redirect: get and check code, get user info, mark code as used, display html template
This commit is contained in:
parent
719048e268
commit
827bba041a
15 changed files with 310 additions and 19 deletions
|
|
@ -87,4 +87,13 @@ impl User {
|
|||
// Get user from username
|
||||
Self::get_by_username(conn, login).await
|
||||
}
|
||||
|
||||
pub async fn get_one_from_authorization_code(
|
||||
conn: impl SqliteExecutor<'_>,
|
||||
code: &str,
|
||||
) -> Result<Option<Self>, Error> {
|
||||
Ok(DatabaseUsers::get_one_from_authorization_code(conn, code)
|
||||
.await?
|
||||
.map(Self::from))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue