Update add_passkey.php

This commit is contained in:
jakani24
2024-04-26 15:43:32 +02:00
parent 75edd7fa62
commit 8c989b6ccd

View File

@@ -5,12 +5,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
<title>Change Password</title>
<title>Add passkey</title>
</head>
<body>
<script>
//js to handle passkey
async function createRegistration() {
async function createRegistration() {
try {
// check browser support
@@ -203,13 +203,6 @@ async function createRegistration() {
if (location.protocol !== 'https:' && location.host !== 'localhost') {
location.href = location.href.replace('http', 'https');
}
//if (!document.getElementById('rpId').value) {
// document.getElementById('rpId').value = location.hostname;
//}
//if (!document.getElementById('attestation_yes').checked) {
// setAttestation(false);
//}
}
</script>
<div class="container mt-5">
@@ -220,9 +213,9 @@ async function createRegistration() {
<h4>Add a passkey?</h4>
</div>
<div class="card-body">
<input type="text" id="username" name="username" value="<?php echo($_GET["username"]); ?>" style="display: none;"></input>
<input type="text" id="username" name="username" value="<?php echo($_GET["username"]); ?>" style="display: none;">
<p>You can add a device specific passkey which allows you to login in securely with your fingerprint / hardware key etc.</p>
<button type="button" class="btn btn-primary btn-block" onclick="checkRegistration()">Add a passkey</button>
<button type="button" class="btn btn-primary btn-block" onclick="createRegistration()">Add a passkey</button>
<br><br>
<a href="end.php" class="btn btn-primary btn-block">Skip for now</a>