Revert "Merge pull request #74 from vercel-labs:jp/next-auth"

This reverts commit 6051e186b5, reversing
changes made to 28f62d80cf.
This commit is contained in:
Jared Palmer 2023-06-21 14:32:54 -07:00
parent 6051e186b5
commit e9e40d7a08
5 changed files with 44 additions and 26 deletions

16
auth.ts
View file

@ -1,26 +1,16 @@
import NextAuth, { type DefaultSession } from 'next-auth'
import NextAuth from 'next-auth'
import GitHub from 'next-auth/providers/github'
declare module 'next-auth' {
/**
* Returned by `useSession`, `getSession` and received as a prop on the `SessionProvider` React Context
*/
interface Session {
user: {
/** The user's postal address. */
id: string
} & DefaultSession['user']
}
}
export const {
handlers: { GET, POST },
auth,
CSRF_experimental
// @ts-ignore
} = NextAuth({
// @ts-ignore
providers: [GitHub],
callbacks: {
// @ts-ignore
jwt: async ({ token, profile }) => {
if (profile?.id) {
token.id = profile.id