mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-29 11:57:32 +00:00
feat: Initial implementation of OIDC
This commit is contained in:
32 files changed
+1300
-63
No files matched your search
@@ -0,0 +1,17 @@
|
||||
use conduwuit::Result;
|
||||
|
||||
use crate::utils::parse_active_local_user_id;
|
||||
|
||||
impl crate::Context<'_> {
|
||||
pub(super) async fn oidc_link(&self, user_id: String, subject: String) -> Result {
|
||||
let user_id = parse_active_local_user_id(self.services, &user_id).await?;
|
||||
|
||||
self.services.oidc.link_user(&user_id, &subject).await;
|
||||
|
||||
self.write_str("Account linked successfully").await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(super) async fn oidc_unlink(&self, _user_id: String) -> Result { todo!() }
|
||||
}
|
||||
Reference in new issue
Block a user