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

13
next-auth.d.ts vendored Normal file
View file

@ -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']
}
}

View file

@ -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",
@ -67,5 +67,10 @@
"tailwindcss-animate": "^1.0.5",
"typescript": "^5.1.3"
},
"pnpm": {
"overrides": {
"@auth/nextjs": "0.0.0-manual.223c6467"
}
},
"packageManager": "pnpm@8.6.1"
}

26
pnpm-lock.yaml generated
View file

@ -4,6 +4,9 @@ settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
overrides:
'@auth/nextjs': 0.0.0-manual.223c6467
dependencies:
'@radix-ui/react-alert-dialog':
specifier: ^1.0.4
@ -63,8 +66,8 @@ dependencies:
specifier: 13.4.7-canary.1
version: 13.4.7-canary.1(react-dom@18.2.0)(react@18.2.0)
next-auth:
specifier: 0.0.0-manual.e65faa1c
version: 0.0.0-manual.e65faa1c(next@13.4.7-canary.1)(react-dom@18.2.0)(react@18.2.0)
specifier: 0.0.0-manual.4cd21ea5
version: 0.0.0-manual.4cd21ea5(next@13.4.7-canary.1)(react-dom@18.2.0)(react@18.2.0)
next-themes:
specifier: ^0.2.1
version: 0.2.1(next@13.4.7-canary.1)(react-dom@18.2.0)(react@18.2.0)
@ -165,8 +168,8 @@ packages:
engines: {node: '>=10'}
dev: true
/@auth/core@0.0.0-manual.8fcd46b0:
resolution: {integrity: sha512-KuhvZ0hHz6NvMAgAi+su0dJOD0YAiOWGaLswyfGK5RsG/cdhqyyiII9HOTaZbWZAKir0UGYb8SlN+owhV30JXg==}
/@auth/core@0.8.2:
resolution: {integrity: sha512-swqJ7tKFlqiYIl1znFGrrawUv1F6rwL+/f3DoeWDaZLnr2phiHFaZsvNvLK7WBJhnJbel78Vd3GznuR31AnFUw==}
peerDependencies:
nodemailer: ^6.8.0
peerDependenciesMeta:
@ -181,13 +184,13 @@ packages:
preact-render-to-string: 5.2.3(preact@10.11.3)
dev: false
/@auth/nextjs@0.0.0-manual.b53ca00b(next@13.4.7-canary.1)(react@18.2.0):
resolution: {integrity: sha512-g0XvlP+3MSXPX512K6Hu0mGOkb1QPCkXkaA0Zr9i+bmTEDU9TtYTTNmX2EyvLeTfmrEEU/CMS92aWTmiki1KVA==}
/@auth/nextjs@0.0.0-manual.223c6467(next@13.4.7-canary.1)(react@18.2.0):
resolution: {integrity: sha512-nO6TMZ67ysq5lwpffQofxVLlTDHBLYX2x6VNXCXqbOoapofAk1qKyJ57lelHQdgV3py6qqWej/bTa4fDL19IDw==}
peerDependencies:
next: ^13.4.6
next: ^13.4.2
react: ^18.2.0
dependencies:
'@auth/core': 0.0.0-manual.8fcd46b0
'@auth/core': 0.8.2
next: 13.4.7-canary.1(react-dom@18.2.0)(react@18.2.0)
react: 18.2.0
transitivePeerDependencies:
@ -4142,8 +4145,8 @@ packages:
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
dev: true
/next-auth@0.0.0-manual.e65faa1c(next@13.4.7-canary.1)(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-I51GvhZhZEf/gzhiTKivYPAIyZ74sCF3YXAMMuZ/bjahybeehPEu7opcPEA+H0Uxrvmo2G8/BQ7mT+TiFdM9IQ==}
/next-auth@0.0.0-manual.4cd21ea5(next@13.4.7-canary.1)(react-dom@18.2.0)(react@18.2.0):
resolution: {integrity: sha512-qzsrs2xeopmIYUz1C+FbudBIoNI7xSTd1xWeECr/Qa4NFzbCt8Dr9tb2Yocpa5jnRpk0xN96HwsJqimOYVjtRg==}
peerDependencies:
next: ^13.4.5
nodemailer: ^6.6.5
@ -4153,7 +4156,8 @@ packages:
nodemailer:
optional: true
dependencies:
'@auth/nextjs': 0.0.0-manual.b53ca00b(next@13.4.7-canary.1)(react@18.2.0)
'@auth/core': 0.8.2
'@auth/nextjs': 0.0.0-manual.223c6467(next@13.4.7-canary.1)(react@18.2.0)
next: 13.4.7-canary.1(react-dom@18.2.0)(react@18.2.0)
react: 18.2.0
react-dom: 18.2.0(react@18.2.0)

View file

@ -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"]
}