fix: add auth core
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
"start": "next start"
|
"start": "next start"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@auth/core": "^0.19.0",
|
||||||
"@auth/drizzle-adapter": "^0.3.2",
|
"@auth/drizzle-adapter": "^0.3.2",
|
||||||
"@headlessui/react": "^1.7.17",
|
"@headlessui/react": "^1.7.17",
|
||||||
"@planetscale/database": "^1.11.0",
|
"@planetscale/database": "^1.11.0",
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import {
|
|||||||
varchar,
|
varchar,
|
||||||
} from "drizzle-orm/mysql-core";
|
} from "drizzle-orm/mysql-core";
|
||||||
|
|
||||||
|
import { type AdapterAccount } from "@auth/core/adapters";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is an example of how to use the multi-project schema feature of Drizzle ORM. Use the same
|
* This is an example of how to use the multi-project schema feature of Drizzle ORM. Use the same
|
||||||
* database instance for multiple projects.
|
* database instance for multiple projects.
|
||||||
@@ -188,7 +190,7 @@ export const accounts = mySqlTable(
|
|||||||
{
|
{
|
||||||
userId: varchar("userId", { length: 255 }).notNull(),
|
userId: varchar("userId", { length: 255 }).notNull(),
|
||||||
type: varchar("type", { length: 255 })
|
type: varchar("type", { length: 255 })
|
||||||
.$type<"oauth" | "oidc" | "email">()
|
.$type<AdapterAccount["type"]>()
|
||||||
.notNull(),
|
.notNull(),
|
||||||
provider: varchar("provider", { length: 255 }).notNull(),
|
provider: varchar("provider", { length: 255 }).notNull(),
|
||||||
providerAccountId: varchar("providerAccountId", { length: 255 }).notNull(),
|
providerAccountId: varchar("providerAccountId", { length: 255 }).notNull(),
|
||||||
|
|||||||
Reference in New Issue
Block a user