Skip to content

Commit

Permalink
chore: add next-auth function
Browse files Browse the repository at this point in the history
  • Loading branch information
colorfield committed May 2, 2024
1 parent 2291392 commit 3547c64
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions apps/website/src/api/auth/[...nextauth].js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// If your deployment environment supports Gatsby Functions, you won't need the root `api` folder, only this.
import NextAuth from 'next-auth';

import { authConfig } from '../../../nextauth.config';

// @ts-ignore
export default async function handler(req, res) {
req.query.nextauth = req.params.nextauth.split('/');
return await NextAuth(req, res, authConfig);
}

0 comments on commit 3547c64

Please sign in to comment.