forked from jmug/stoatchat
fix: add more oauth2 checks
This commit is contained in:
7 files changed
+26
-8
No files matched your search
@@ -123,4 +123,14 @@ pub async fn add_code_challange(token: &str, code_challenge: &str) -> Result<()>
|
||||
.map_err(|_| create_error!(InternalError))?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn get_code_challange(token: &str) -> Result<Option<String>> {
|
||||
let mut conn = redis_kiss::get_connection()
|
||||
.await
|
||||
.map_err(|_| create_error!(InternalError))?;
|
||||
|
||||
conn.get(format!("oauth2:{token}:code_challenge"))
|
||||
.await
|
||||
.map_err(|_| create_error!(InternalError))
|
||||
}
|
||||
Reference in new issue
Block a user