mirror of
https://github.com/documenso/documenso.git
synced 2025-11-15 09:12:02 +10:00
chore: tidy code
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/// <reference types="../types/next-auth.d.ts" />
|
||||
import { KyselyAdapter } from '@auth/kysely-adapter';
|
||||
import { PrismaAdapter } from '@next-auth/prisma-adapter';
|
||||
import { compare } from '@node-rs/bcrypt';
|
||||
import { verifyAuthenticationResponse } from '@simplewebauthn/server';
|
||||
import { DateTime } from 'luxon';
|
||||
@ -24,11 +24,9 @@ import { ZAuthenticationResponseJSONSchema } from '../types/webauthn';
|
||||
import { extractNextAuthRequestMetadata } from '../universal/extract-request-metadata';
|
||||
import { getAuthenticatorOptions } from '../utils/authenticator';
|
||||
import { ErrorCode } from './error-codes';
|
||||
import { db } from './kysely-db/db';
|
||||
|
||||
export const NEXT_AUTH_OPTIONS: AuthOptions = {
|
||||
//@ts-expect-error - https://github.com/nextauthjs/next-auth/issues/8660
|
||||
adapter: KyselyAdapter(db),
|
||||
adapter: PrismaAdapter(prisma),
|
||||
secret: process.env.NEXTAUTH_SECRET ?? 'secret',
|
||||
session: {
|
||||
strategy: 'jwt',
|
||||
|
||||
@ -1,14 +0,0 @@
|
||||
import { KyselyAuth } from '@auth/kysely-adapter';
|
||||
import type { Codegen } from '@auth/kysely-adapter';
|
||||
import { PostgresDialect } from 'kysely';
|
||||
import { Pool } from 'pg';
|
||||
|
||||
import type { DB } from '@documenso/prisma/generated/types';
|
||||
|
||||
export const db = new KyselyAuth<DB, Codegen>({
|
||||
dialect: new PostgresDialect({
|
||||
pool: new Pool({
|
||||
connectionString: process.env.DATABASE_URL,
|
||||
}),
|
||||
}),
|
||||
});
|
||||
Reference in New Issue
Block a user