refactor: refactor authentication pages into their own modules

This commit is contained in:
Prad Nukala
2024-11-27 13:37:07 -05:00
parent 44027b9303
commit 74d8d516b3
79 changed files with 1621 additions and 5687 deletions
@@ -0,0 +1,37 @@
package internal
templ CreateCredentialsScript() {
<script>
function createCredential() {
navigator.credentials.create({
publicKey: {
rp: {
name: "Sonr",
},
user: {
id: new Uint8Array(0),
name: "Sonr",
displayName: "Sonr",
},
challenge: new Uint8Array(0),
pubKeyCredParams: [{
type: "public-key",
alg: -7,
}],
timeout: 60000,
excludeCredentials: [],
authenticatorSelection: {
requireResidentKey: false,
userVerification: "discouraged",
},
},
})
.then((assertion) => {
console.log("Assertion:", assertion);
})
.catch((error) => {
console.error("Error:", error);
});
}
</script>
}