Add passkey support

This commit is contained in:
Johannes Zellner
2026-02-12 21:10:51 +01:00
parent 3e09bef613
commit 5724ca73b4
16 changed files with 992 additions and 69 deletions

View File

@@ -381,3 +381,16 @@ CREATE TABLE IF NOT EXISTS locks(
version INT DEFAULT 1
ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);
CREATE TABLE IF NOT EXISTS passkeys(
id VARCHAR(128) NOT NULL UNIQUE,
userId VARCHAR(128) NOT NULL,
credentialId VARCHAR(512) NOT NULL UNIQUE,
publicKey TEXT NOT NULL,
counter BIGINT DEFAULT 0,
transports TEXT,
name VARCHAR(128) DEFAULT "",
creationTime TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
lastUsedTime TIMESTAMP NULL,
FOREIGN KEY(userId) REFERENCES users(id),
PRIMARY KEY(id));