Skip to content

Commit

Permalink
Revert "Merge pull request vercel#74 from vercel-labs:jp/next-auth"
Browse files Browse the repository at this point in the history
This reverts commit 6051e18, reversing
changes made to 28f62d8.
  • Loading branch information
jaredpalmer committed Jun 21, 2023
1 parent 6051e18 commit e9e40d7
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 26 deletions.
16 changes: 3 additions & 13 deletions auth.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 13 additions & 0 deletions next-auth.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import NextAuth, { DefaultSession } from 'next-auth'

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']
}
}
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"focus-trap-react": "^10.1.1",
"nanoid": "^4.0.2",
"next": "13.4.7-canary.1",
"next-auth": "0.0.0-manual.e65faa1c",
"next-auth": "0.0.0-manual.4cd21ea5",
"next-themes": "^0.2.1",
"openai-edge": "^0.5.1",
"react": "^18.2.0",
Expand Down Expand Up @@ -67,5 +67,10 @@
"tailwindcss-animate": "^1.0.5",
"typescript": "^5.1.3"
},
"pnpm": {
"overrides": {
"@auth/nextjs": "0.0.0-manual.223c6467"
}
},
"packageManager": "[email protected]"
}
26 changes: 15 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
],
"strictNullChecks": true
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"include": [
"next-env.d.ts",
"next-auth.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": ["node_modules"]
}

0 comments on commit e9e40d7

Please sign in to comment.