feat: github auth

This commit is contained in:
2024-12-14 00:43:07 +01:00
parent e3eab0f5a1
commit 0bf480ef71
16 changed files with 202 additions and 112 deletions

View File

@@ -0,0 +1,17 @@
/*
Warnings:
- You are about to drop the column `hashed_password` on the `User` table. All the data in the column will be lost.
- A unique constraint covering the columns `[githubId]` on the table `User` will be added. If there are existing duplicate values, this will fail.
- Added the required column `githubId` to the `User` table without a default value. This is not possible if the table is not empty.
*/
-- DropIndex
DROP INDEX "User_username_key";
-- AlterTable
ALTER TABLE "User" DROP COLUMN "hashed_password",
ADD COLUMN "githubId" TEXT NOT NULL;
-- CreateIndex
CREATE UNIQUE INDEX "User_githubId_key" ON "User"("githubId");

View File

@@ -15,8 +15,8 @@ datasource db {
model User {
id String @id @default(cuid())
username String @unique
hashed_password String
githubId String @unique
username String
sessions Session[]
}