mirror of
https://github.com/SrIzan10/next-auth.git
synced 2026-05-01 10:55:20 +00:00
* refactor(ts): export `AdapterAccount` from `next-auth/adapters` * chore: run linter, remove prisma warning * fix(ts): match TS with implementation closer * remove unused import * rename error * add missing dev dependency * fix type * fix type * fix more types and tests * remove unused `id` * skip upstash tests in CI * revert some changes * fix type * revert some change * revert some change * revert some change * revert some changes * update lock file * revert line change * revert some change * improve adapter & oauth typing * fix test, revert * apply review suggestion * Add test for new rejection logics * Update assert.test.ts * fix: Hubspot config * restore some ts-expect-error * fix: tests in mirko-orm * fix: remove redundant id: string * fix: use ts-expect-errors * fix: simplify provider type * fix: normalize user options * restore ts-expect-errors Co-authored-by: Thang Vu <hi@thvu.dev>
54 lines
1.1 KiB
Plaintext
54 lines
1.1 KiB
Plaintext
datasource db {
|
|
provider = "sqlite"
|
|
url = "file:./dev.db"
|
|
}
|
|
|
|
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
model User {
|
|
id String @id @default(cuid())
|
|
name String?
|
|
email String? @unique
|
|
emailVerified DateTime?
|
|
image String?
|
|
phone String?
|
|
role String?
|
|
accounts Account[]
|
|
sessions Session[]
|
|
}
|
|
|
|
model Account {
|
|
userId String
|
|
type String
|
|
provider String
|
|
providerAccountId String
|
|
refresh_token String?
|
|
access_token String?
|
|
expires_at Int?
|
|
token_type String?
|
|
scope String?
|
|
id_token String?
|
|
session_state String?
|
|
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
|
|
@@id([provider, providerAccountId])
|
|
}
|
|
|
|
model Session {
|
|
sessionToken String @unique
|
|
userId String
|
|
expires DateTime
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
}
|
|
|
|
model VerificationToken {
|
|
identifier String
|
|
token String @unique
|
|
expires DateTime
|
|
|
|
@@id([identifier, token])
|
|
}
|