fixing some bugs with passkeys

This commit is contained in:
jakani24
2024-04-26 16:15:59 +02:00
parent c924815e99
commit db0eda762f
3 changed files with 3 additions and 3 deletions

View File

@@ -239,6 +239,7 @@ async function checkRegistration() {
<br>
<p>Or</p>
<button type="button" class="btn btn-primary btn-block" onclick="checkRegistration()">Login with a passkey</button>
<br>
<!-- php code to verify password-->
<?php
// Check if the form is submitted

View File

@@ -175,6 +175,7 @@ try {
$_SESSION["perms"]=$row["perms"];
$_SESSION["email"]=$row["email"];
$_SESSION["telegram_id"]=$row["telegram_id"];
$_SESSION["allow_pw_llgin"]=$row["allow_pw_login"];
$return = new stdClass();
$return->success = true;

View File

@@ -84,7 +84,6 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
<input type="text" class="form-control" id="perms" name="perms" value="<?php echo($perms); ?>" readonly>
</div>
<div class="form-group">
<label for="pw_login">Allow password logins. (Please make shure you have a passkey, if you disable this!)</label>
<?php
if($_SESSION["allow_pw_login"]==1){
echo("<input type='checkbox' id='pw_login' name='pw_login' checked>");
@@ -92,8 +91,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
echo("<input type='checkbox' id='pw_login' name='pw_login'>");
}
?>
<input type="checkbox" id="pw_login" name="pw_login">
<label for="pw_login">Allow password logins. (Please make shure you have a passkey, if you disable this!)</label>
</div>
<br>
<button type="submit" class="btn btn-primary btn-block">Update</button>