From 6549377b772e2fda0128934039e7755e48312a1e Mon Sep 17 00:00:00 2001 From: Chris Hayes <6013871+Christopher-Hayes@users.noreply.github.com> Date: Mon, 17 Apr 2023 05:35:48 -0400 Subject: [PATCH 1/8] docs: Remove --save from install command (#7277) Remove --save from install command --save is no longer needed on npm install. --- packages/next-auth/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next-auth/README.md b/packages/next-auth/README.md index 282ee9f53c..14be11b66a 100644 --- a/packages/next-auth/README.md +++ b/packages/next-auth/README.md @@ -41,7 +41,7 @@ This is a monorepo containing the following packages / projects: ## Getting Started ``` -npm install --save next-auth +npm install next-auth ``` The easiest way to continue getting started, is to follow the [getting started](https://next-auth.js.org/getting-started/example) section in our docs. From 9a300dd129928f26a1090e86215809ebb2dcbce1 Mon Sep 17 00:00:00 2001 From: Raul <57044803+Leprekus@users.noreply.github.com> Date: Mon, 17 Apr 2023 02:36:23 -0700 Subject: [PATCH 2/8] chore: fix "Contributing guide" link (#7279) --- packages/next-auth/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next-auth/README.md b/packages/next-auth/README.md index 14be11b66a..fa0995abfc 100644 --- a/packages/next-auth/README.md +++ b/packages/next-auth/README.md @@ -247,7 +247,7 @@ We're happy to announce we've recently created an [OpenCollective](https://openc ## Contributing We're open to all community contributions! If you'd like to contribute in any way, please first read -our [Contributing Guide](https://github.com/nextauthjs/next-auth/blob/main/CONTRIBUTING.md). +our [Contributing Guide](https://github.com/nextauthjs/.github/blob/main/CONTRIBUTING.md). ## License From 906f2a87975c8d092fb5ce1f97f718dcf8235feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Orb=C3=A1n?= Date: Tue, 18 Apr 2023 18:46:49 +0200 Subject: [PATCH 3/8] fix: detect origin when `instanceof Request` check fails (#7303) --- packages/next-auth/src/core/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/next-auth/src/core/index.ts b/packages/next-auth/src/core/index.ts index 99e477984b..27ff069f97 100644 --- a/packages/next-auth/src/core/index.ts +++ b/packages/next-auth/src/core/index.ts @@ -77,6 +77,11 @@ async function toInternalRequest( query, } } + + const { headers } = req + const host = headers?.["x-forwarded-host"] ?? headers?.host + req.origin = detectOrigin(host, headers?.["x-forwarded-proto"]) + return req } From b078da507e1206950567112495d78c2606f53eea Mon Sep 17 00:00:00 2001 From: Nick Parsons Date: Tue, 18 Apr 2023 13:13:19 -0600 Subject: [PATCH 4/8] docs: Update Clerk sponsorship URL (#7305) - Change Clerk URL from `https://clerk.dev` to `https://clerk.com` - Fix alt from copy/paste --- packages/next-auth/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/next-auth/README.md b/packages/next-auth/README.md index fa0995abfc..c001448c63 100644 --- a/packages/next-auth/README.md +++ b/packages/next-auth/README.md @@ -204,8 +204,8 @@ We're happy to announce we've recently created an [OpenCollective](https://openc 🥉 Bronze Financial Sponsor - - Prisma Logo + + Clerk Logo
Clerk

🥉 Bronze Financial Sponsor From 060df5a8abc553d90a2fb4b4f694d7e2f3ecbd97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Orb=C3=A1n?= Date: Fri, 21 Apr 2023 12:25:48 +0200 Subject: [PATCH 5/8] chore: bump react types --- apps/dev/package.json | 2 +- apps/example-nextjs/package.json | 2 +- packages/next-auth/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/dev/package.json b/apps/dev/package.json index 23dbec42ae..24c5a65ef5 100644 --- a/apps/dev/package.json +++ b/apps/dev/package.json @@ -29,7 +29,7 @@ }, "devDependencies": { "@types/jsonwebtoken": "^8.5.5", - "@types/react": "^18.0.15", + "@types/react": "^18.0.37", "@types/react-dom": "^18.0.6", "fake-smtp-server": "^0.8.0", "pg": "^8.7.3", diff --git a/apps/example-nextjs/package.json b/apps/example-nextjs/package.json index 2225d1600d..1496c3b70c 100644 --- a/apps/example-nextjs/package.json +++ b/apps/example-nextjs/package.json @@ -26,7 +26,7 @@ }, "devDependencies": { "@types/node": "^17", - "@types/react": "^18.0.15", + "@types/react": "^18.0.37", "typescript": "^4" } } diff --git a/packages/next-auth/package.json b/packages/next-auth/package.json index 4c8c620e64..6fcd1a2dfb 100644 --- a/packages/next-auth/package.json +++ b/packages/next-auth/package.json @@ -107,7 +107,7 @@ "@types/node": "^17.0.42", "@types/nodemailer": "^6.4.4", "@types/oauth": "^0.9.1", - "@types/react": "^18.0.15", + "@types/react": "18.0.37", "@types/react-dom": "^18.0.6", "autoprefixer": "^10.4.7", "babel-plugin-jsx-pragmatic": "^1.0.2", From a3fed18aae438de317f5724fd78a0f3e8dfb784d Mon Sep 17 00:00:00 2001 From: Victor Date: Sun, 30 Apr 2023 11:34:05 +0300 Subject: [PATCH 6/8] fix(docs): fix default `maxAge` formula (#7406) --- packages/next-auth/src/jwt/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/next-auth/src/jwt/types.ts b/packages/next-auth/src/jwt/types.ts index ecd0e2a9b0..58242fc867 100644 --- a/packages/next-auth/src/jwt/types.ts +++ b/packages/next-auth/src/jwt/types.ts @@ -21,7 +21,7 @@ export interface JWTEncodeParams { secret: string | Buffer /** * The maximum age of the NextAuth.js issued JWT in seconds. - * @default 30 * 24 * 30 * 60 // 30 days + * @default 30 * 24 * 60 * 60 // 30 days */ maxAge?: number } @@ -42,7 +42,7 @@ export interface JWTOptions { secret: string /** * The maximum age of the NextAuth.js issued JWT in seconds. - * @default 30 * 24 * 30 * 60 // 30 days + * @default 30 * 24 * 60 * 60 // 30 days */ maxAge: number /** Override this method to control the NextAuth.js issued JWT encoding. */ From 7c90b2918d33f98135033f350ba606cb7fa5fd78 Mon Sep 17 00:00:00 2001 From: Thang Vu Date: Wed, 3 May 2023 11:44:34 +0700 Subject: [PATCH 7/8] Update pnpm-lock.yaml --- pnpm-lock.yaml | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 450a0cb9dc..7d9b17b0c9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,7 +60,7 @@ importers: '@prisma/client': ^3 '@supabase/supabase-js': ^2.0.5 '@types/jsonwebtoken': ^8.5.5 - '@types/react': ^18.0.15 + '@types/react': ^18.0.37 '@types/react-dom': ^18.0.6 fake-smtp-server: ^0.8.0 faunadb: ^4 @@ -88,7 +88,7 @@ importers: react-dom: 18.2.0_react@18.2.0 devDependencies: '@types/jsonwebtoken': 8.5.8 - '@types/react': 18.0.15 + '@types/react': 18.2.0 '@types/react-dom': 18.0.6 fake-smtp-server: 0.8.0 pg: 8.7.3 @@ -462,7 +462,7 @@ importers: '@types/node': ^17.0.42 '@types/nodemailer': ^6.4.4 '@types/oauth': ^0.9.1 - '@types/react': ^18.0.15 + '@types/react': 18.0.37 '@types/react-dom': ^18.0.6 autoprefixer: ^10.4.7 babel-plugin-jsx-pragmatic: ^1.0.2 @@ -512,13 +512,13 @@ importers: '@testing-library/dom': 8.14.0 '@testing-library/jest-dom': 5.16.4 '@testing-library/react': 13.3.0_biqbaboplfbrettd7655fr4n2y - '@testing-library/react-hooks': 8.0.1_bb2bxwco6ptpubzwpazr52qf6i + '@testing-library/react-hooks': 8.0.1_jf7puk66b2eiqxne3oe3xlxkou '@testing-library/user-event': 14.2.1_ihvo3xlg2d6kwqju3os3zitn3y '@types/jest': 28.1.3 '@types/node': 17.0.45 '@types/nodemailer': 6.4.4 '@types/oauth': 0.9.1 - '@types/react': 18.0.15 + '@types/react': 18.0.37 '@types/react-dom': 18.0.6 autoprefixer: 10.4.7_postcss@8.4.14 babel-plugin-jsx-pragmatic: 1.0.2 @@ -5348,7 +5348,7 @@ packages: '@docusaurus/react-loadable': 5.5.2_react@18.2.0 '@docusaurus/types': 2.1.0_biqbaboplfbrettd7655fr4n2y '@types/history': 4.7.11 - '@types/react': 18.0.15 + '@types/react': 18.2.0 '@types/react-router-config': 5.0.6 '@types/react-router-dom': 5.3.3 react: 18.2.0 @@ -5647,7 +5647,7 @@ packages: peerDependencies: react: '*' dependencies: - '@types/react': 18.0.26 + '@types/react': 18.2.0 prop-types: 15.8.1 react: 18.2.0 dev: true @@ -5716,7 +5716,7 @@ packages: '@docusaurus/plugin-content-pages': 2.1.0_biqbaboplfbrettd7655fr4n2y '@docusaurus/utils': 2.1.0_@docusaurus+types@2.1.0 '@types/history': 4.7.11 - '@types/react': 18.0.15 + '@types/react': 18.2.0 '@types/react-router-config': 5.0.6 clsx: 1.2.1 parse-numeric-range: 1.3.0 @@ -5801,7 +5801,7 @@ packages: react-dom: ^16.8.4 || ^17.0.0 dependencies: '@types/history': 4.7.11 - '@types/react': 18.0.15 + '@types/react': 18.2.0 commander: 5.1.0 joi: 17.6.0 react: 18.2.0 @@ -8237,7 +8237,7 @@ packages: redent: 3.0.0 dev: true - /@testing-library/react-hooks/8.0.1_bb2bxwco6ptpubzwpazr52qf6i: + /@testing-library/react-hooks/8.0.1_jf7puk66b2eiqxne3oe3xlxkou: resolution: {integrity: sha512-Aqhl2IVmLt8IovEVarNDFuJDVWVvhnr9/GCU6UUnrYXwgDFF9h2L2o2P9KBni1AST5sT6riAyoukFLyjQUgD/g==} engines: {node: '>=12'} peerDependencies: @@ -8254,7 +8254,7 @@ packages: optional: true dependencies: '@babel/runtime': 7.20.13 - '@types/react': 18.0.15 + '@types/react': 18.0.37 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 react-error-boundary: 3.1.4_react@18.2.0 @@ -8782,14 +8782,14 @@ packages: /@types/react-dom/18.0.6: resolution: {integrity: sha512-/5OFZgfIPSwy+YuIBP/FgJnQnsxhZhjjrnxudMddeblOouIodEQ75X14Rr4wGSG/bknL+Omy9iWlLo1u/9GzAA==} dependencies: - '@types/react': 18.0.26 + '@types/react': 18.2.0 dev: true /@types/react-router-config/5.0.6: resolution: {integrity: sha512-db1mx37a1EJDf1XeX8jJN7R3PZABmJQXR8r28yUjVMFSjkmnQo6X6pOEEmNl+Tp2gYQOGPdYbFIipBtdElZ3Yg==} dependencies: '@types/history': 4.7.11 - '@types/react': 18.0.26 + '@types/react': 18.2.0 '@types/react-router': 5.1.18 dev: true @@ -8797,7 +8797,7 @@ packages: resolution: {integrity: sha512-kpqnYK4wcdm5UaWI3fLcELopqLrHgLqNsdpHauzlQktfkHL3npOSwtj1Uz9oKBAzs7lFtVkV8j83voAz2D8fhw==} dependencies: '@types/history': 4.7.11 - '@types/react': 18.0.26 + '@types/react': 18.2.0 '@types/react-router': 5.1.18 dev: true @@ -8805,19 +8805,19 @@ packages: resolution: {integrity: sha512-YYknwy0D0iOwKQgz9v8nOzt2J6l4gouBmDnWqUUznltOTaon+r8US8ky8HvN0tXvc38U9m6z/t2RsVsnd1zM0g==} dependencies: '@types/history': 4.7.11 - '@types/react': 18.0.26 + '@types/react': 18.2.0 dev: true - /@types/react/18.0.15: - resolution: {integrity: sha512-iz3BtLuIYH1uWdsv6wXYdhozhqj20oD4/Hk2DNXIn1kFsmp9x8d9QB6FnPhfkbhd2PgEONt9Q1x/ebkwjfFLow==} + /@types/react/18.0.37: + resolution: {integrity: sha512-4yaZZtkRN3ZIQD3KSEwkfcik8s0SWV+82dlJot1AbGYHCzJkWP3ENBY6wYeDRmKZ6HkrgoGAmR2HqdwYGp6OEw==} dependencies: '@types/prop-types': 15.7.5 '@types/scheduler': 0.16.2 csstype: 3.1.0 dev: true - /@types/react/18.0.26: - resolution: {integrity: sha512-hCR3PJQsAIXyxhTNSiDFY//LhnMZWpNNr5etoCqx/iUfGc5gXWtQR2Phl908jVR6uPXacojQWTg4qRpkxTuGug==} + /@types/react/18.2.0: + resolution: {integrity: sha512-0FLj93y5USLHdnhIhABk83rm8XEGA7kH3cr+YUlvxoUGp1xNt/DINUMvqPxLyOQMzLmZe8i4RTHbvb8MC7NmrA==} dependencies: '@types/prop-types': 15.7.5 '@types/scheduler': 0.16.2 @@ -9508,8 +9508,10 @@ packages: indent-string: 4.0.0 dev: true - /ajv-formats/2.1.1: + /ajv-formats/2.1.1_ajv@8.11.0: resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} + peerDependencies: + ajv: ^8.0.0 peerDependenciesMeta: ajv: optional: true @@ -13785,7 +13787,7 @@ packages: dependencies: '@apidevtools/json-schema-ref-parser': 9.0.9 ajv: 8.11.0 - ajv-formats: 2.1.1 + ajv-formats: 2.1.1_ajv@8.11.0 body-parser: 1.20.0 content-type: 1.0.4 deep-freeze: 0.0.1 @@ -22295,7 +22297,7 @@ packages: dependencies: '@types/json-schema': 7.0.11 ajv: 8.11.0 - ajv-formats: 2.1.1 + ajv-formats: 2.1.1_ajv@8.11.0 ajv-keywords: 5.1.0_ajv@8.11.0 dev: true From d2984fbe9d53d76faf97035b230a507db30008bf Mon Sep 17 00:00:00 2001 From: Thang Vu Date: Thu, 4 May 2023 07:58:53 +0700 Subject: [PATCH 8/8] sync package.json change --- packages/next-auth/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next-auth/package.json b/packages/next-auth/package.json index 6fcd1a2dfb..0394fa5041 100644 --- a/packages/next-auth/package.json +++ b/packages/next-auth/package.json @@ -1,6 +1,6 @@ { "name": "next-auth", - "version": "4.22.0", + "version": "4.22.1", "description": "Authentication for Next.js", "homepage": "https://next-auth.js.org", "repository": "https://github.com/nextauthjs/next-auth.git",