From 58b6bd756857cd384788a188e9659dfe18436eca Mon Sep 17 00:00:00 2001 From: Pierre Hubert Date: Thu, 25 Aug 2022 08:03:49 +0200 Subject: [PATCH] Add RP name in webauthn --- src/data/webauthn_manager.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/data/webauthn_manager.rs b/src/data/webauthn_manager.rs index b9de5ae..4d4ef16 100644 --- a/src/data/webauthn_manager.rs +++ b/src/data/webauthn_manager.rs @@ -6,7 +6,7 @@ use uuid::Uuid; use webauthn_rs::{Webauthn, WebauthnBuilder}; use webauthn_rs::prelude::{CreationChallengeResponse, Passkey, PublicKeyCredential, RegisterPublicKeyCredential, RequestChallengeResponse}; -use crate::constants::{WEBAUTHN_LOGIN_CHALLENGE_EXPIRE, WEBAUTHN_REGISTER_CHALLENGE_EXPIRE}; +use crate::constants::{APP_NAME, WEBAUTHN_LOGIN_CHALLENGE_EXPIRE, WEBAUTHN_REGISTER_CHALLENGE_EXPIRE}; use crate::data::app_config::AppConfig; use crate::data::crypto_wrapper::CryptoWrapper; use crate::data::user::{User, UserID}; @@ -60,6 +60,7 @@ impl WebAuthManager { &url::Url::parse(&conf.website_origin) .expect("Failed to parse configuration origin!")) .expect("Invalid Webauthn configuration") + .rp_name(APP_NAME) .build() .expect("Failed to build webauthn")