base con autenticacion, registro, modulo encuestas
This commit is contained in:
17
apps/web/lib/auth.ts
Normal file
17
apps/web/lib/auth.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import NextAuth, { NextAuthConfig, Session } from 'next-auth';
|
||||
import authConfig from './auth.config';
|
||||
|
||||
export const {
|
||||
handlers,
|
||||
signIn,
|
||||
signOut,
|
||||
auth,
|
||||
}: {
|
||||
handlers: any;
|
||||
signIn: (provider?: string) => Promise<void>;
|
||||
signOut: () => Promise<void>;
|
||||
auth: () => Promise<Session | null>;
|
||||
} = NextAuth({
|
||||
session: { strategy: 'jwt' },
|
||||
...(authConfig as NextAuthConfig),
|
||||
});
|
||||
Reference in New Issue
Block a user