Can create accounts automatically for a given upstream provider
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-10-29 11:30:45 +01:00
parent 764ad3d5a1
commit 9a599fdde2
8 changed files with 130 additions and 15 deletions

View File

@@ -1,6 +1,5 @@
use actix::Addr;
use actix_web::{HttpResponse, Responder, web};
use uuid::Uuid;
use webauthn_rs::prelude::RegisterPublicKeyCredential;
use crate::actors::users_actor;
@@ -53,7 +52,7 @@ pub async fn save_totp_factor(
}
let factor = TwoFactor {
id: FactorID(Uuid::new_v4().to_string()),
id: FactorID::random(),
name: factor_name,
kind: TwoFactorType::TOTP(key),
};
@@ -102,7 +101,7 @@ pub async fn save_webauthn_factor(
};
let factor = TwoFactor {
id: FactorID(Uuid::new_v4().to_string()),
id: FactorID::random(),
name: factor_name,
kind: TwoFactorType::WEBAUTHN(Box::new(key)),
};