Does Account table/model in create-t3-app get used at all if using EmailProvider for NextAuth?

In the Prisma schema for a create-t3-app with NextAuth, the following Account model is in the schema.prisma file:

// Necessary for Next auth
model Account {
id String @id @default(cuid())
userId String
type String
provider String
providerAccountId String
refresh_token String? @db.Text
access_token String? @db.Text
expires_at Int?
token_type String?
scope String?
id_token String? @db.Text
session_state String?
user User @relation(fields: [userId], references: [id], onDelete: Cascade)

@@unique([provider, providerAccountId])
}

// Necessary for Next auth
model Account {
id String @id @default(cuid())
userId String
type String
provider String
providerAccountId String
refresh_token String? @db.Text
access_token String? @db.Text
expires_at Int?
token_type String?
scope String?
id_token String? @db.Text
session_state String?
user User @relation(fields: [userId], references: [id], onDelete: Cascade)

@@unique([provider, providerAccountId])
}
I have set up the project to use EmailProvider for NextAuth so I can sign in using a magic link. However, when I view the Account table in Prisma Studio, I don't ever see anything in the Account table. What is this table used for? Is it only used for other providers? TIA
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server