fix: add auth core

This commit is contained in:
Henry
2024-01-03 12:54:47 +00:00
parent 7afe538eb6
commit 17a22541b5
3 changed files with 4 additions and 1 deletions

BIN
bun.lockb

Binary file not shown.

View File

@@ -13,6 +13,7 @@
"start": "next start"
},
"dependencies": {
"@auth/core": "^0.19.0",
"@auth/drizzle-adapter": "^0.3.2",
"@headlessui/react": "^1.7.17",
"@planetscale/database": "^1.11.0",

View File

@@ -10,6 +10,8 @@ import {
varchar,
} 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
* database instance for multiple projects.
@@ -188,7 +190,7 @@ export const accounts = mySqlTable(
{
userId: varchar("userId", { length: 255 }).notNull(),
type: varchar("type", { length: 255 })
.$type<"oauth" | "oidc" | "email">()
.$type<AdapterAccount["type"]>()
.notNull(),
provider: varchar("provider", { length: 255 }).notNull(),
providerAccountId: varchar("providerAccountId", { length: 255 }).notNull(),