Files

11 lines
219 B
TypeScript

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