mirror of
https://github.com/fergalmoran/kidarr-server.git
synced 2025-12-22 09:17:51 +00:00
Fix next auth adapter TS bollocks
This commit is contained in:
17
package.json
17
package.json
@@ -12,10 +12,9 @@
|
|||||||
"start": "next start"
|
"start": "next start"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@auth/drizzle-adapter": "^0.3.6",
|
"@auth/drizzle-adapter": "^0.3.14",
|
||||||
"@faker-js/faker": "^8.3.1",
|
"@faker-js/faker": "^8.3.1",
|
||||||
"@hookform/resolvers": "^3.3.3",
|
"@hookform/resolvers": "^3.3.3",
|
||||||
"@planetscale/database": "^1.11.0",
|
|
||||||
"@radix-ui/react-accordion": "^1.1.2",
|
"@radix-ui/react-accordion": "^1.1.2",
|
||||||
"@radix-ui/react-alert-dialog": "^1.0.5",
|
"@radix-ui/react-alert-dialog": "^1.0.5",
|
||||||
"@radix-ui/react-aspect-ratio": "^1.0.3",
|
"@radix-ui/react-aspect-ratio": "^1.0.3",
|
||||||
@@ -59,8 +58,8 @@
|
|||||||
"http-status-codes": "^2.3.0",
|
"http-status-codes": "^2.3.0",
|
||||||
"leaflet": "^1.9.4",
|
"leaflet": "^1.9.4",
|
||||||
"local-ssl-proxy": "^2.0.5",
|
"local-ssl-proxy": "^2.0.5",
|
||||||
"lucide-react": "^0.303.0",
|
"lucide-react": "^0.307.0",
|
||||||
"next": "^14.0.3",
|
"next": "^14.0.4",
|
||||||
"next-auth": "^4.24.5",
|
"next-auth": "^4.24.5",
|
||||||
"next-themes": "^0.2.1",
|
"next-themes": "^0.2.1",
|
||||||
"pg": "^8.11.3",
|
"pg": "^8.11.3",
|
||||||
@@ -73,8 +72,8 @@
|
|||||||
"react-qr-code": "^2.0.12",
|
"react-qr-code": "^2.0.12",
|
||||||
"react-resizable-panels": "^1.0.7",
|
"react-resizable-panels": "^1.0.7",
|
||||||
"server-only": "^0.0.1",
|
"server-only": "^0.0.1",
|
||||||
"socket.io": "^4.7.2",
|
"socket.io": "^4.7.3",
|
||||||
"socket.io-client": "^4.7.2",
|
"socket.io-client": "^4.7.3",
|
||||||
"sonner": "^1.3.1",
|
"sonner": "^1.3.1",
|
||||||
"superjson": "^2.2.1",
|
"superjson": "^2.2.1",
|
||||||
"tailwind-merge": "^2.2.0",
|
"tailwind-merge": "^2.2.0",
|
||||||
@@ -93,12 +92,12 @@
|
|||||||
"@typescript-eslint/parser": "^6.16.0",
|
"@typescript-eslint/parser": "^6.16.0",
|
||||||
"autoprefixer": "^10.4.16",
|
"autoprefixer": "^10.4.16",
|
||||||
"dotenv-cli": "^7.3.0",
|
"dotenv-cli": "^7.3.0",
|
||||||
"drizzle-kit": "^0.20.9",
|
"drizzle-kit": "^0.20.10",
|
||||||
"eslint": "^8.56.0",
|
"eslint": "^8.56.0",
|
||||||
"postcss": "^8.4.32",
|
"postcss": "^8.4.33",
|
||||||
"prettier": "^3.1.1",
|
"prettier": "^3.1.1",
|
||||||
"prettier-plugin-tailwindcss": "^0.5.10",
|
"prettier-plugin-tailwindcss": "^0.5.10",
|
||||||
"tailwindcss": "^3.4.0",
|
"tailwindcss": "^3.4.1",
|
||||||
"typescript": "^5.3.3"
|
"typescript": "^5.3.3"
|
||||||
},
|
},
|
||||||
"ct3aMetadata": {
|
"ct3aMetadata": {
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import GoogleProvider from "next-auth/providers/google";
|
|||||||
|
|
||||||
import { env } from "@/env";
|
import { env } from "@/env";
|
||||||
import { db } from "@/server/db";
|
import { db } from "@/server/db";
|
||||||
|
import { Adapter } from "next-auth/adapters";
|
||||||
/**
|
/**
|
||||||
* Module augmentation for `next-auth` types. Allows us to add custom properties to the `session`
|
* Module augmentation for `next-auth` types. Allows us to add custom properties to the `session`
|
||||||
* object and keep type safety.
|
* object and keep type safety.
|
||||||
@@ -35,7 +36,7 @@ declare module "next-auth" {
|
|||||||
* @see https://next-auth.js.org/configuration/options
|
* @see https://next-auth.js.org/configuration/options
|
||||||
*/
|
*/
|
||||||
export const authOptions: NextAuthOptions = {
|
export const authOptions: NextAuthOptions = {
|
||||||
adapter: DrizzleAdapter(db),
|
adapter: DrizzleAdapter(db) as Adapter,
|
||||||
callbacks: {
|
callbacks: {
|
||||||
session: async ({ session, token }) => {
|
session: async ({ session, token }) => {
|
||||||
if (session?.user) {
|
if (session?.user) {
|
||||||
|
|||||||
Reference in New Issue
Block a user