Revert "Merge pull request #74 from vercel-labs:jp/next-auth"
This reverts commit6051e186b5, reversing changes made to28f62d80cf.
This commit is contained in:
parent
6051e186b5
commit
e9e40d7a08
5 changed files with 44 additions and 26 deletions
16
auth.ts
16
auth.ts
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue