Skip to content

Commit

Permalink
Uncomment code
Browse files Browse the repository at this point in the history
  • Loading branch information
lmuntaner committed Dec 4, 2024
1 parent 70460ce commit 71ad644
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/internet_identity/src/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,24 @@ pub fn get_static_assets(maybe_related_origins: Option<Vec<String>>) -> Vec<Asse

println!("in da get_static_assets");

// if let Some(related_origins) = maybe_related_origins {
// println!("related_origin: {}", related_origins[0]);
// // Serialize the content into JSON and convert it to a Vec<u8>
// let content = json!({
// "origins": related_origins,
// })
// .to_string()
// .into_bytes();
// // Required to share passkeys with the different domains.
// // See https://web.dev/articles/webauthn-related-origin-requests#step_2_set_up_your_well-knownwebauthn_json_file_in_site-1
// // Maximum of 5 labels. If we want to support more, we'll need to set them in the configuration.
// assets.push(Asset {
// url_path: "/.well-known/webauthn".to_string(),
// content,
// encoding: ContentEncoding::Identity,
// content_type: ContentType::OCTETSTREAM,
// });
// }
if let Some(related_origins) = maybe_related_origins {
println!("related_origin: {}", related_origins[0]);
// Serialize the content into JSON and convert it to a Vec<u8>
let content = json!({
"origins": related_origins,
})
.to_string()
.into_bytes();
// Required to share passkeys with the different domains.
// See https://web.dev/articles/webauthn-related-origin-requests#step_2_set_up_your_well-knownwebauthn_json_file_in_site-1
// Maximum of 5 labels. If we want to support more, we'll need to set them in the configuration.
assets.push(Asset {
url_path: "/.well-known/webauthn".to_string(),
content,
encoding: ContentEncoding::Identity,
content_type: ContentType::OCTETSTREAM,
});
}
assets
}

Expand Down

0 comments on commit 71ad644

Please sign in to comment.