New: Microsoft OAuth2.0

This commit is contained in:
2024-10-03 22:59:23 +02:00
parent 77974e2c61
commit 09c0747b97
7 changed files with 264 additions and 0 deletions

View File

@ -30,8 +30,25 @@ model User {
lastName String?
hashedPassword String?
salt String?
identites Identity[]
resetToken String?
resetTokenExpiresAt DateTime?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Identity {
id Int @id @default(autoincrement())
provider String
uid String
userId Int
user User @relation(fields: [userId], references: [id])
accessToken String?
scope String?
lastLoginAt DateTime @default(now())
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@unique([provider, uid])
@@index(userId)
}