diff --git a/apps/desktop/desktop_native/windows_plugin_authenticator/src/com_registration.rs b/apps/desktop/desktop_native/windows_plugin_authenticator/src/com_registration.rs
index 8225ef40a24..0f4f3beb10f 100644
--- a/apps/desktop/desktop_native/windows_plugin_authenticator/src/com_registration.rs
+++ b/apps/desktop/desktop_native/windows_plugin_authenticator/src/com_registration.rs
@@ -13,7 +13,7 @@ const AUTHENTICATOR_NAME: &str = "Bitwarden Desktop";
const CLSID: &str = "0f7dc5d9-69ce-4652-8572-6877fd695062";
const RPID: &str = "bitwarden.com";
const AAGUID: &str = "d548826e-79b4-db40-a3d8-11116f7e8349";
-const LOGO_SVG: &str = r#""#;
+const LOGO_SVG: &str = r#""#;
/// Parses a UUID string (with hyphens) into bytes
fn parse_uuid_to_bytes(uuid_str: &str) -> Result, String> {
@@ -187,9 +187,8 @@ pub fn add_authenticator() -> std::result::Result<(), String> {
let relying_party_id_ptr = PCWSTR(relying_party_id.as_ptr()).as_ptr();
// Base64-encode the SVG as required by Windows API
- let logo_svg_base64 = base64::engine::general_purpose::STANDARD.encode(LOGO_SVG);
- let logo_svg_hstring: HSTRING = logo_svg_base64.as_str().into();
- let logo_svg_ptr = PCWSTR(logo_svg_hstring.as_ptr()).as_ptr();
+ let logo_b64: String = base64::encode(LOGO_SVG);
+ let logo_b64_buf: Vec = logo_b64.encode_utf16().collect();
// Generate CBOR authenticator info dynamically
let authenticator_info_bytes = generate_cbor_authenticator_info()
@@ -199,8 +198,8 @@ pub fn add_authenticator() -> std::result::Result<(), String> {
authenticator_name: authenticator_name_ptr,
rclsid: &clsid_guid, // Changed to GUID reference
rpid: relying_party_id_ptr,
- light_theme_logo_svg: logo_svg_ptr,
- dark_theme_logo_svg: logo_svg_ptr,
+ light_theme_logo_svg: logo_b64_buf.as_ptr(),
+ dark_theme_logo_svg: logo_b64_buf.as_ptr(),
cbor_authenticator_info_byte_count: authenticator_info_bytes.len() as u32,
cbor_authenticator_info: authenticator_info_bytes.as_ptr(), // Use as_ptr() not as_mut_ptr()
supported_rp_ids_count: 0, // NEW field: 0 means all RPs supported