Files

11 lines
224 B
TypeScript

import NextAuth, { type AuthOptions } from 'next-auth';
export const createAuthHandler = (options: AuthOptions) => {
const authHandler = NextAuth(options);
return {
GET: authHandler,
POST: authHandler,
};
};