finishing touches for passkey auth, oauth and more

This commit is contained in:
Janis Steiner
2024-12-26 13:12:24 +01:00
parent e8cba3edf6
commit 301c9493b1
9 changed files with 232 additions and 173 deletions

View File

@@ -61,7 +61,7 @@
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(255) NOT NULL UNIQUE,
public_key TEXT DEFAULT '',
credential_id VARBINARY(64),
credential_id VARBINARY(255),
counter INT DEFAULT 0,
2fa VARCHAR(255),
email VARCHAR(255),
@@ -93,6 +93,26 @@
</div>';
}
$sql="CREATE TABLE IF NOT EXISTS auth_tokens (
id INT AUTO_INCREMENT PRIMARY KEY,
auth_token VARCHAR(256),
user_id INT
);";
if ($conn->query($sql) === TRUE) {
echo '<br><div class="alert alert-success" role="alert">
Table auth_tokens created successfully!
</div>';
} else {
$success=0;
echo '<br><div class="alert alert-danger" role="alert">
Error creating auth_tokens users: ' . $conn->error .'
</div>';
}
if($success!==1){