I have following JavaScript function as code snippet:
window.registerWebAuthn = function () {
const publicKeyCredentialCreationOptions = {
challenge: new Uint8Array(26),
rp: {
name: "Example",
id : "localhost"
},
user: {
id: new Uint8Array(26),
name: "[email protected]",
displayName: "Foo Bar"
}
};
The string values for the following parameters are hard-coded:
id
name
displayName
I want to rewrite this code to use dynamic values.
Can you tell me how I can do that?