This commit is contained in:
		| @@ -73,7 +73,7 @@ pub async fn save_webauthn_factor(user: CurrentUser, form: web::Json<AddWebauthn | |||||||
|     user.add_factor(TwoFactor { |     user.add_factor(TwoFactor { | ||||||
|         id: FactorID(Uuid::new_v4().to_string()), |         id: FactorID(Uuid::new_v4().to_string()), | ||||||
|         name: form.0.factor_name, |         name: form.0.factor_name, | ||||||
|         kind: TwoFactorType::WEBAUTHN(key), |         kind: TwoFactorType::WEBAUTHN(Box::new(key)), | ||||||
|     }); |     }); | ||||||
|     let res = users.send(users_actor::UpdateUserRequest(user)).await.unwrap().0; |     let res = users.send(users_actor::UpdateUserRequest(user)).await.unwrap().0; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -14,7 +14,7 @@ pub struct FactorID(pub String); | |||||||
| #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] | #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] | ||||||
| pub enum TwoFactorType { | pub enum TwoFactorType { | ||||||
|     TOTP(TotpKey), |     TOTP(TotpKey), | ||||||
|     WEBAUTHN(WebauthnPubKey), |     WEBAUTHN(Box<WebauthnPubKey>), | ||||||
| } | } | ||||||
|  |  | ||||||
| #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] | #[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user