Adds in authentication system and overhauls the navigation bar to be built dynamically.

This commit is contained in:
Cameron Redmore 2025-04-24 21:35:52 +01:00
parent 7e98b5345d
commit 28c054de22
21 changed files with 1531 additions and 56 deletions

View file

@ -99,3 +99,27 @@ model Setting {
@@map("settings") // Map to the 'settings' table
}
// Added for WebAuthn
model User {
id String @id @default(uuid())
username String @unique
authenticators Authenticator[]
@@map("users")
}
model Authenticator {
id String @id @default(uuid())
credentialID String @unique @map("credential_id") // Base64URL encoded
credentialPublicKey Bytes @map("credential_public_key")
counter BigInt
credentialDeviceType String @map("credential_device_type") // 'singleDevice' or 'multiDevice'
credentialBackedUp Boolean @map("credential_backed_up")
transports String? // Comma-separated list like "internal,hybrid"
userId String @map("user_id")
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@map("authenticators")
}