Compare commits

...

2 Commits

Author SHA1 Message Date
dnikomon
4dcdb62dca fix: remove nextauth from authorization params (#3332)
Co-authored-by: Balázs Orbán <info@balazsorban.com>
2021-12-02 19:43:42 +01:00
Nico Domino
1f4b7d8089 chore: add opencollective to package.json (#3333) 2021-12-02 12:50:14 +01:00
2 changed files with 14 additions and 18 deletions

View File

@@ -7,7 +7,7 @@
"author": "Iain Collins <me@iaincollins.com>",
"contributors": [
"Balázs Orbán <info@balazsorban.com>",
"Nico Domino <info@ndo.dev>",
"Nico Domino <yo@ndo.dev>",
"Lluis Agusti <hi@llu.lu>"
],
"main": "index.js",
@@ -144,10 +144,7 @@
"parserOptions": {
"project": "./tsconfig.json"
},
"extends": [
"standard-with-typescript",
"prettier"
],
"extends": ["standard-with-typescript", "prettier"],
"ignorePatterns": [
"node_modules",
"next-env.d.ts",
@@ -171,18 +168,12 @@
},
"overrides": [
{
"files": [
"./**/*test.js"
],
"files": ["./**/*test.js"],
"env": {
"jest/globals": true
},
"extends": [
"plugin:jest/recommended"
],
"plugins": [
"jest"
]
"extends": ["plugin:jest/recommended"],
"plugins": ["jest"]
}
]
},
@@ -216,6 +207,10 @@
{
"type": "github",
"url": "https://github.com/sponsors/balazsorban44"
},
{
"type": "opencollective",
"url": "https://opencollective.com/nextauth"
}
]
}

View File

@@ -18,17 +18,18 @@ async function NextAuthNextHandler(
res: NextApiResponse,
options: NextAuthOptions
) {
const { nextauth, ...query } = req.query
const handler = await NextAuthHandler({
req: {
host: (process.env.NEXTAUTH_URL ?? process.env.VERCEL_URL) as string,
body: req.body,
query: req.query,
query,
cookies: req.cookies,
headers: req.headers,
method: req.method,
action: req.query.nextauth?.[0] as NextAuthAction,
providerId: req.query.nextauth?.[1],
error: (req.query.error as string | undefined) ?? req.query.nextauth?.[1],
action: nextauth?.[0] as NextAuthAction,
providerId: nextauth?.[1],
error: (req.query.error as string | undefined) ?? nextauth?.[1],
},
options,
})