Skip to content

Commit

Permalink
fix thirtparty
Browse files Browse the repository at this point in the history
  • Loading branch information
JiangShuuu committed Nov 17, 2023
1 parent 25b2e2a commit ba2aefb
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 28 deletions.
52 changes: 26 additions & 26 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,44 @@ datasource db {
}

model User {
id String @id @default(cuid())
name String?
email String? @unique
emailVerified DateTime?
image String?
hashedPassword String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
accounts Account[]
File File[]
Message Message[]
id String @id @default(uuid())
name String?
email String? @unique
emailVerified DateTime?
image String?
hashedPassword String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
accounts Account[]
File File[]
Message Message[]
stripeCustomerId String? @unique @map(name: "stripe_customer_id")
stripeSubscriptionId String? @unique @map(name: "stripe_subscription_id")
stripePriceId String? @map(name: "stripe_price_id")
stripeCurrentPeriodEnd DateTime? @map(name: "stripe_current_period_end")
}

model Account {
id String @id @default(cuid())
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?
id String @id @default(uuid())
userId String
type String
provider String
providerAccountId String
refresh_token String?
access_token String? @db.Text
expires_at Int?
token_type String?
scope String?
id_token String? @db.Text
session_state String?
// Relation
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@unique([provider, providerAccountId])
}


enum UploadStatus {
PENDING
PROCESSING
Expand Down
6 changes: 4 additions & 2 deletions src/pages/api/auth/[...nextauth].ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ export const authOptions: AuthOptions = {
providers: [
GithubProvider({
clientId: process.env.THIRT_GITHUB_ID as string,
clientSecret: process.env.THIRT_GITHUB_SECRET as string
clientSecret: process.env.THIRT_GITHUB_SECRET as string,
allowDangerousEmailAccountLinking: true
}),
GoogleProvider({
clientId: process.env.GOOGLE_CLIENT_ID as string,
clientSecret: process.env.GOOGLE_CLIENT_SECRET as string
clientSecret: process.env.GOOGLE_CLIENT_SECRET as string,
allowDangerousEmailAccountLinking: true
}),
CredentialsProvider({
name: 'credentials',
Expand Down

0 comments on commit ba2aefb

Please sign in to comment.