* Add webauthn * Complete WebAuthn device sign up and login * Move device registration to account page * Replace the token login with a WebAuthn prompt if the current device has been registered * Mark the current device in the list of registered auth devices * Fix after rebase * Fix tests * Disable "Add current device" button if current device is registered * Add option to "Stay signed in" * Remove device list feature, sign in with deviceId instead * Improve usability * Update changelog Co-authored-by: Matthias Frey <mfrey43@gmail.com> Co-authored-by: Thomas <4159106+dtslvr@users.noreply.github.com>
19 lines
537 B
SQL
19 lines
537 B
SQL
-- AlterTable
|
|
ALTER TABLE "User" ADD COLUMN "authChallenge" TEXT;
|
|
|
|
-- CreateTable
|
|
CREATE TABLE "AuthDevice" (
|
|
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
"credentialId" BYTEA NOT NULL,
|
|
"credentialPublicKey" BYTEA NOT NULL,
|
|
"counter" INTEGER NOT NULL,
|
|
"id" TEXT NOT NULL,
|
|
"updatedAt" TIMESTAMP(3) NOT NULL,
|
|
"userId" TEXT NOT NULL,
|
|
|
|
PRIMARY KEY ("id")
|
|
);
|
|
|
|
-- AddForeignKey
|
|
ALTER TABLE "AuthDevice" ADD FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|