fix: add more oauth2 checks

This commit is contained in:
Zomatree committed 2025-08-18 01:58:14 +01:00
1 parent 11eee02cfe
commit 5a5f84f207
7 files changed
+26 -8

No files matched your search

+10
View File
@@ -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))
}