diff --git a/package-lock.json b/package-lock.json index bf29bc0..4e830c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,9 +12,24 @@ "@types/react": "18.2.6", "@types/react-dom": "18.2.4", "next": "13.4.2-canary.5", + "next-auth": "^4.22.1", "react": "18.2.0", "react-dom": "18.2.0", "typescript": "5.0.4" + }, + "devDependencies": { + "@types/cookie": "^0.5.1" + } + }, + "node_modules/@babel/runtime": { + "version": "7.21.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.5.tgz", + "integrity": "sha512-8jI69toZqqcsnqGGqwGS4Qb1VwLOEp4hz+CXPywcvjs60u3B4Pom/U/7rm4W8tMOYEB+E9wgD0mW1l3r8qlI9Q==", + "dependencies": { + "regenerator-runtime": "^0.13.11" + }, + "engines": { + "node": ">=6.9.0" } }, "node_modules/@next/env": { @@ -157,6 +172,14 @@ "node": ">= 10" } }, + "node_modules/@panva/hkdf": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@panva/hkdf/-/hkdf-1.1.1.tgz", + "integrity": "sha512-dhPeilub1NuIG0X5Kvhh9lH4iW3ZsHlnzwgwbOlgwQ2wG1IqFzsgHqmKPk3WzsdWAeaxKJxgM0+W433RmN45GA==", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, "node_modules/@swc/helpers": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.1.tgz", @@ -165,6 +188,12 @@ "tslib": "^2.4.0" } }, + "node_modules/@types/cookie": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.5.1.tgz", + "integrity": "sha512-COUnqfB2+ckwXXSFInsFdOAWQzCCx+a5hq2ruyj+Vjund94RJQd4LG2u9hnvJrTgunKAaax7ancBYlDrNYxA0g==", + "dev": true + }, "node_modules/@types/node": { "version": "20.1.2", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.2.tgz", @@ -233,11 +262,27 @@ "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/csstype": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==" }, + "node_modules/jose": { + "version": "4.14.4", + "resolved": "https://registry.npmjs.org/jose/-/jose-4.14.4.tgz", + "integrity": "sha512-j8GhLiKmUAh+dsFXlX1aJCbt5KMibuKb+d7j1JaOJG6s2UjX1PQlW+OKB/sD4a/5ZYF4RcmYmLSndOoU3Lt/3g==", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -254,6 +299,17 @@ "loose-envify": "cli.js" } }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/nanoid": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", @@ -324,6 +380,68 @@ } } }, + "node_modules/next-auth": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/next-auth/-/next-auth-4.22.1.tgz", + "integrity": "sha512-NTR3f6W7/AWXKw8GSsgSyQcDW6jkslZLH8AiZa5PQ09w1kR8uHtR9rez/E9gAq/o17+p0JYHE8QjF3RoniiObA==", + "dependencies": { + "@babel/runtime": "^7.20.13", + "@panva/hkdf": "^1.0.2", + "cookie": "^0.5.0", + "jose": "^4.11.4", + "oauth": "^0.9.15", + "openid-client": "^5.4.0", + "preact": "^10.6.3", + "preact-render-to-string": "^5.1.19", + "uuid": "^8.3.2" + }, + "peerDependencies": { + "next": "^12.2.5 || ^13", + "nodemailer": "^6.6.5", + "react": "^17.0.2 || ^18", + "react-dom": "^17.0.2 || ^18" + }, + "peerDependenciesMeta": { + "nodemailer": { + "optional": true + } + } + }, + "node_modules/oauth": { + "version": "0.9.15", + "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz", + "integrity": "sha512-a5ERWK1kh38ExDEfoO6qUHJb32rd7aYmPHuyCu3Fta/cnICvYmgd2uhuKXvPD+PXB+gCEYYEaQdIRAjCOwAKNA==" + }, + "node_modules/object-hash": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz", + "integrity": "sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/oidc-token-hash": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/oidc-token-hash/-/oidc-token-hash-5.0.3.tgz", + "integrity": "sha512-IF4PcGgzAr6XXSff26Sk/+P4KZFJVuHAJZj3wgO3vX2bMdNVp/QXTP3P7CEm9V1IdG8lDLY3HhiqpsE/nOwpPw==", + "engines": { + "node": "^10.13.0 || >=12.0.0" + } + }, + "node_modules/openid-client": { + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/openid-client/-/openid-client-5.4.2.tgz", + "integrity": "sha512-lIhsdPvJ2RneBm3nGBBhQchpe3Uka//xf7WPHTIglery8gnckvW7Bd9IaQzekzXJvWthCMyi/xVEyGW0RFPytw==", + "dependencies": { + "jose": "^4.14.1", + "lru-cache": "^6.0.0", + "object-hash": "^2.2.0", + "oidc-token-hash": "^5.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -352,6 +470,31 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/preact": { + "version": "10.13.2", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.13.2.tgz", + "integrity": "sha512-q44QFLhOhty2Bd0Y46fnYW0gD/cbVM9dUVtNTDKPcdXSMA7jfY+Jpd6rk3GB0lcQss0z5s/6CmVP0Z/hV+g6pw==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + } + }, + "node_modules/preact-render-to-string": { + "version": "5.2.6", + "resolved": "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-5.2.6.tgz", + "integrity": "sha512-JyhErpYOvBV1hEPwIxc/fHWXPfnEGdRKxc8gFdAZ7XV4tlzyzG847XAyEZqoDnynP88akM4eaHcSOzNcLWFguw==", + "dependencies": { + "pretty-format": "^3.8.0" + }, + "peerDependencies": { + "preact": ">=10" + } + }, + "node_modules/pretty-format": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-3.8.0.tgz", + "integrity": "sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew==" + }, "node_modules/react": { "version": "18.2.0", "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", @@ -375,6 +518,11 @@ "react": "^18.2.0" } }, + "node_modules/regenerator-runtime": { + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" + }, "node_modules/scheduler": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", @@ -438,6 +586,19 @@ "node": ">=12.20" } }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, "node_modules/zod": { "version": "3.21.4", "resolved": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz", diff --git a/package.json b/package.json index 9247ff1..672707d 100644 --- a/package.json +++ b/package.json @@ -17,5 +17,8 @@ "react": "18.2.0", "react-dom": "18.2.0", "typescript": "5.0.4" + }, + "devDependencies": { + "@types/cookie": "^0.5.1" } } diff --git a/src/app/issue1/ClientExampleEmbeddedServer.tsx b/src/app/issue1/ClientExampleEmbeddedServer.tsx index 5268077..da97fec 100644 --- a/src/app/issue1/ClientExampleEmbeddedServer.tsx +++ b/src/app/issue1/ClientExampleEmbeddedServer.tsx @@ -1,7 +1,7 @@ 'use client'; interface Props { - action: (message: string) => Promise; + action: (message: string) => Promise; } export default function ClientExampleEmbeddedServer(props: Props) { diff --git a/src/app/issue1/ServerExample.tsx b/src/app/issue1/ServerExample.tsx index 4c7951a..4b78b74 100644 --- a/src/app/issue1/ServerExample.tsx +++ b/src/app/issue1/ServerExample.tsx @@ -1,7 +1,7 @@ 'use server'; -import { getServerSession } from 'next-auth/next'; +import { getSession } from '@/util/session'; export default async function ServerExample(message: string) { - return await getServerSession({}); + return await getSession(); } \ No newline at end of file diff --git a/src/app/issue1/ServerExample2.tsx b/src/app/issue1/ServerExample2.tsx index a7160ea..f449eb6 100644 --- a/src/app/issue1/ServerExample2.tsx +++ b/src/app/issue1/ServerExample2.tsx @@ -1,7 +1,7 @@ 'use server'; -import { getServerSession } from 'next-auth/next'; +import { getSession } from '@/util/session'; export default async function ServerExample2(message: string) { - return await getServerSession({}); + return await getSession(); } \ No newline at end of file diff --git a/src/app/issue2/ClientExampleEmbeddedServer.tsx b/src/app/issue2/ClientExampleEmbeddedServer.tsx index c735a3f..22e3a46 100644 --- a/src/app/issue2/ClientExampleEmbeddedServer.tsx +++ b/src/app/issue2/ClientExampleEmbeddedServer.tsx @@ -1,7 +1,7 @@ 'use client'; interface Props { - action: (message: string) => Promise; + action: (message: string) => Promise; } export default function ClientExampleEmbeddedServer(props: Props) { diff --git a/src/app/issue2/SharedServerExample.tsx b/src/app/issue2/SharedServerExample.tsx index 4c7951a..4b78b74 100644 --- a/src/app/issue2/SharedServerExample.tsx +++ b/src/app/issue2/SharedServerExample.tsx @@ -1,7 +1,7 @@ 'use server'; -import { getServerSession } from 'next-auth/next'; +import { getSession } from '@/util/session'; export default async function ServerExample(message: string) { - return await getServerSession({}); + return await getSession(); } \ No newline at end of file diff --git a/src/app/local/ClientExampleEmbeddedServer.tsx b/src/app/local/ClientExampleEmbeddedServer.tsx new file mode 100644 index 0000000..1f5ad38 --- /dev/null +++ b/src/app/local/ClientExampleEmbeddedServer.tsx @@ -0,0 +1,11 @@ +'use client'; + +interface Props { + action: (message: string) => Promise; +} + +export default function ClientExampleEmbeddedServer(props: Props) { + return ( + + ) +} \ No newline at end of file diff --git a/src/app/local/ClientImportsOwnServer.tsx b/src/app/local/ClientImportsOwnServer.tsx new file mode 100644 index 0000000..e6838c2 --- /dev/null +++ b/src/app/local/ClientImportsOwnServer.tsx @@ -0,0 +1,9 @@ +'use client'; + +import ServerExample from "./SharedServerExample"; + +export default function ClientImportsOwnServer() { + return ( + + ) +} \ No newline at end of file diff --git a/src/app/local/SharedServerExample.tsx b/src/app/local/SharedServerExample.tsx new file mode 100644 index 0000000..4fd4e6f --- /dev/null +++ b/src/app/local/SharedServerExample.tsx @@ -0,0 +1,7 @@ +'use server'; + +import { __unstable__getSession } from "@/util/session"; + +export default async function ServerExample(message: string) { + return await __unstable__getSession(); +} \ No newline at end of file diff --git a/src/app/local/page.tsx b/src/app/local/page.tsx new file mode 100644 index 0000000..bb12bc5 --- /dev/null +++ b/src/app/local/page.tsx @@ -0,0 +1,12 @@ +import ClientExampleEmbeddedServer from "./ClientExampleEmbeddedServer" +import ClientImportsOwnServer from "./ClientImportsOwnServer"; +import ServerExample from "./SharedServerExample" + +export default function Page() { + return ( +
+ + +
+ ) +} diff --git a/src/util/_internal_session.ts b/src/util/_internal_session.ts new file mode 100644 index 0000000..85d4b16 --- /dev/null +++ b/src/util/_internal_session.ts @@ -0,0 +1,100 @@ +import { AuthOptions, CallbacksOptions, Session } from 'next-auth'; +import { AuthHandler } from 'next-auth/core'; +import { GetServerSidePropsContext, NextApiRequest, NextApiResponse } from 'next'; +import { Cookie } from 'next-auth/core/lib/cookie'; +import { serialize } from 'cookie'; + +// @ts-expect-error +export function setCookie(res, cookie: Cookie) { + // Preserve any existing cookies that have already been set in the same session + let setCookieHeader = res.getHeader('Set-Cookie') ?? []; + // If not an array (i.e. a string with a single cookie) convert it into an array + if (!Array.isArray(setCookieHeader)) { + setCookieHeader = [setCookieHeader]; + } + const { name, value, options } = cookie; + const cookieHeader = serialize(name, value, options); + setCookieHeader.push(cookieHeader); + res.setHeader('Set-Cookie', setCookieHeader); +} + +type GetServerSessionOptions = Partial> & { + callbacks?: Omit & { + session?: (...args: Parameters) => any; + }; +}; + +type GetServerSessionParams = + | [GetServerSidePropsContext['req'], GetServerSidePropsContext['res'], O] + | [NextApiRequest, NextApiResponse, O] + | [O] + | []; + +let experimentalRSCWarningShown = false; + +export async function __internal__unstable__getSession< + O extends GetServerSessionOptions, + R = O['callbacks'] extends { session: (...args: Array) => infer U } ? U : Session, +>(...args: GetServerSessionParams): Promise { + const isRSC = args.length === 0 || args.length === 1; + if (!experimentalRSCWarningShown && isRSC && process.env.NODE_ENV !== 'production') { + console.warn( + '[next-auth][warn][EXPERIMENTAL_API]', + '\n`getServerSession` is used in a React Server Component.', + `\nhttps://next-auth.js.org/configuration/nextjs#getServerSession}`, + `\nhttps://next-auth.js.org/warnings#EXPERIMENTAL_API`, + ); + experimentalRSCWarningShown = true; + } + + // @ts-expect-error + let req, res, options: AuthOptions; + if (isRSC) { + options = Object.assign({}, args[0], { providers: [] }); + + // eslint-disable-next-line @typescript-eslint/no-var-requires + const { headers, cookies } = require('next/headers'); + req = { + headers: Object.fromEntries(headers() as Headers), + cookies: Object.fromEntries( + cookies() + .getAll() + // @ts-expect-error + .map((c) => [c.name, c.value]), + ), + }; + res = { getHeader() {}, setCookie() {}, setHeader() {} }; + } else { + req = args[0]; + res = args[1]; + options = Object.assign({}, args[2], { providers: [] }); + } + + options.secret ??= process.env.NEXTAUTH_SECRET; + + const session = await AuthHandler({ + options, + req: { + action: 'session', + method: 'GET', + cookies: req.cookies, + headers: req.headers, + }, + }); + + const { body, cookies, status = 200 } = session; + + // @ts-expect-error + cookies?.forEach((cookie) => setCookie(res, cookie)); + + if (body && typeof body !== 'string' && Object.keys(body).length) { + if (status === 200) { + // @ts-expect-error + if (isRSC) delete body.expires; + return body as R; + } + throw new Error((body as any).message); + } + + return null; +} diff --git a/src/util/session.ts b/src/util/session.ts new file mode 100644 index 0000000..aef9fce --- /dev/null +++ b/src/util/session.ts @@ -0,0 +1,10 @@ +import { getServerSession } from 'next-auth/next'; +import { __internal__unstable__getSession } from './_internal_session'; + +export async function getSession() { + return await getServerSession({}); +} + +export async function __unstable__getSession() { + return await __internal__unstable__getSession({}); +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 97b73ff..3944e94 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4,93 +4,58 @@ "@babel/runtime@^7.20.13": version "7.21.5" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.5.tgz#8492dddda9644ae3bda3b45eabe87382caee7200" + resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.21.5.tgz" integrity sha512-8jI69toZqqcsnqGGqwGS4Qb1VwLOEp4hz+CXPywcvjs60u3B4Pom/U/7rm4W8tMOYEB+E9wgD0mW1l3r8qlI9Q== dependencies: regenerator-runtime "^0.13.11" "@next/env@13.4.2-canary.5": version "13.4.2-canary.5" - resolved "https://registry.yarnpkg.com/@next/env/-/env-13.4.2-canary.5.tgz#c8d0c20c2f52622b3627dc66dd181dd108353490" + resolved "https://registry.npmjs.org/@next/env/-/env-13.4.2-canary.5.tgz" integrity sha512-ZFAymK8WgZ0Rr95GOxJ9pm6FRiw4sag2T4nXqoQOK4WavMFjuATEBHpO+F2oN8B+6kDCYUutRWVlRzGOX798iA== "@next/swc-darwin-arm64@13.4.2-canary.5": version "13.4.2-canary.5" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.4.2-canary.5.tgz#4888f8f9a3e4514bb2ae24083296d104c9fd53c7" + resolved "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.4.2-canary.5.tgz" integrity sha512-JJVFGPXCwC9tu/G8W7OGQXQphHQJkJUJqgE1rgKNVwRkL3cb5hcJUV/81cs/VSb4taTqeHmpFp7vQwUBIKwT2g== -"@next/swc-darwin-x64@13.4.2-canary.5": - version "13.4.2-canary.5" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-13.4.2-canary.5.tgz#78bc40923bfb7ac94bfbf805e308a30a5247add3" - integrity sha512-A9ferp3yAywWYb4jrLeaeQaAwZiV3/Nyw4pRfto90/XYIVx2FOaa6ssxlISlNUvbqh3T6rRaYmLCErcFFfrs4w== - -"@next/swc-linux-arm64-gnu@13.4.2-canary.5": - version "13.4.2-canary.5" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.4.2-canary.5.tgz#601d4b6fb1c6f9c15be0a38efeb75d767d0e4ad2" - integrity sha512-RE3xTnpopHSg3CmR/npT4TqvohAj3hpmdlIlZO/8hUAPb+z4+cm4iJ8Uj6TzK7Jl8WxU+9HX28jsUX5BAaKUew== - -"@next/swc-linux-arm64-musl@13.4.2-canary.5": - version "13.4.2-canary.5" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.4.2-canary.5.tgz#c8dcddb4048bcb89e70df6fba8afeb65086ca6d1" - integrity sha512-MTpa525kUYQa32RFtopAYZfo8QTSt7toxVIMMExrleoCVotBp+neGTrs+jm6HomzYuGZxf7E2TSMCxRVuDd3EQ== - -"@next/swc-linux-x64-gnu@13.4.2-canary.5": - version "13.4.2-canary.5" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.4.2-canary.5.tgz#06a715a2c67c535498c9b9952815ef696ce5af80" - integrity sha512-U09U4zXo4cL7effL0wy6L/a3J9wKoVf0RH2nHcTsbiIePYYl9iKl5L4Ry6hEPjQAul9wTotJ2fJLkaUKth8EAA== - -"@next/swc-linux-x64-musl@13.4.2-canary.5": - version "13.4.2-canary.5" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.4.2-canary.5.tgz#32fff5ba9182a0e3e3ad343f9284ce45eab02c48" - integrity sha512-HkPRwToisJUju3szjUqAmXMRl0j2KMQBW3HgqWHS0orXEY4jDaGa7IFhIPDAPdXxLoktahkOpjxRDYW8M0i+zw== - -"@next/swc-win32-arm64-msvc@13.4.2-canary.5": - version "13.4.2-canary.5" - resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.4.2-canary.5.tgz#017a322b4abcfaf5d453d891b0edf7b037984a30" - integrity sha512-aYdSAdMPg5ZbH3SiJp/ItSZBw62J3zLkePJ+0mzJhLB3edYGCtYK4lEfsf2LVGf4NGFqI2FV8Z4kWQe7BMWfIQ== - -"@next/swc-win32-ia32-msvc@13.4.2-canary.5": - version "13.4.2-canary.5" - resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.4.2-canary.5.tgz#db1162177cf4e31fb39f6e531e2407433f5176c9" - integrity sha512-QYNMhC2GGD/ib8JAbftIV5zN52DNLhZhRsUr9n279EE08iDaLecrGudprB6n2e4Lp6IN3+PGQ/gQWIl1Cufzvw== - -"@next/swc-win32-x64-msvc@13.4.2-canary.5": - version "13.4.2-canary.5" - resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.4.2-canary.5.tgz#e5a755c54aa8136923d8a3c4cb4bb8725262f01c" - integrity sha512-ceeHLRgiHD11BSiDRtf3QA44WaY8qW+A1E/c2BkZmpSAnacPJVG2TPSPWjWl0xsB7cTfkkY/LUcFR6yxzFfuTQ== - "@panva/hkdf@^1.0.2": version "1.1.1" - resolved "https://registry.yarnpkg.com/@panva/hkdf/-/hkdf-1.1.1.tgz#ab9cd8755d1976e72fc77a00f7655a64efe6cd5d" + resolved "https://registry.npmjs.org/@panva/hkdf/-/hkdf-1.1.1.tgz" integrity sha512-dhPeilub1NuIG0X5Kvhh9lH4iW3ZsHlnzwgwbOlgwQ2wG1IqFzsgHqmKPk3WzsdWAeaxKJxgM0+W433RmN45GA== "@swc/helpers@0.5.1": version "0.5.1" - resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.1.tgz#e9031491aa3f26bfcc974a67f48bd456c8a5357a" + resolved "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.1.tgz" integrity sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg== dependencies: tslib "^2.4.0" +"@types/cookie@^0.5.1": + version "0.5.1" + resolved "https://registry.npmjs.org/@types/cookie/-/cookie-0.5.1.tgz" + integrity sha512-COUnqfB2+ckwXXSFInsFdOAWQzCCx+a5hq2ruyj+Vjund94RJQd4LG2u9hnvJrTgunKAaax7ancBYlDrNYxA0g== + "@types/node@20.1.2": version "20.1.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.1.2.tgz#8fd63447e3f99aba6c3168fd2ec4580d5b97886f" + resolved "https://registry.npmjs.org/@types/node/-/node-20.1.2.tgz" integrity sha512-CTO/wa8x+rZU626cL2BlbCDzydgnFNgc19h4YvizpTO88MFQxab8wqisxaofQJ/9bLGugRdWIuX/TbIs6VVF6g== "@types/prop-types@*": version "15.7.5" - resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf" + resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz" integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w== "@types/react-dom@18.2.4": version "18.2.4" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.4.tgz#13f25bfbf4e404d26f62ac6e406591451acba9e0" + resolved "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.4.tgz" integrity sha512-G2mHoTMTL4yoydITgOGwWdWMVd8sNgyEP85xVmMKAPUBwQWm9wBPQUmvbeF4V3WBY1P7mmL4BkjQ0SqUpf1snw== dependencies: "@types/react" "*" "@types/react@*", "@types/react@18.2.6": version "18.2.6" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.6.tgz#5cd53ee0d30ffc193b159d3516c8c8ad2f19d571" + resolved "https://registry.npmjs.org/@types/react/-/react-18.2.6.tgz" integrity sha512-wRZClXn//zxCFW+ye/D2qY65UsYP1Fpex2YXorHc8awoNamkMZSvBxwxdYVInsHOZZd2Ppq8isnSzJL5Mpf8OA== dependencies: "@types/prop-types" "*" @@ -99,68 +64,68 @@ "@types/scheduler@*": version "0.16.3" - resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.3.tgz#cef09e3ec9af1d63d2a6cc5b383a737e24e6dcf5" + resolved "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.3.tgz" integrity sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ== busboy@1.6.0: version "1.6.0" - resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" + resolved "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz" integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA== dependencies: streamsearch "^1.1.0" caniuse-lite@^1.0.30001406: version "1.0.30001486" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001486.tgz#56a08885228edf62cbe1ac8980f2b5dae159997e" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001486.tgz" integrity sha512-uv7/gXuHi10Whlj0pp5q/tsK/32J2QSqVRKQhs2j8VsDCjgyruAh/eEXHF822VqO9yT6iZKw3nRwZRSPBE9OQg== client-only@0.0.1: version "0.0.1" - resolved "https://registry.yarnpkg.com/client-only/-/client-only-0.0.1.tgz#38bba5d403c41ab150bff64a95c85013cf73bca1" + resolved "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz" integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA== cookie@^0.5.0: version "0.5.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" + resolved "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz" integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== csstype@^3.0.2: version "3.1.2" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b" + resolved "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz" integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ== jose@^4.11.4, jose@^4.14.1: version "4.14.4" - resolved "https://registry.yarnpkg.com/jose/-/jose-4.14.4.tgz#59e09204e2670c3164ee24cbfe7115c6f8bff9ca" + resolved "https://registry.npmjs.org/jose/-/jose-4.14.4.tgz" integrity sha512-j8GhLiKmUAh+dsFXlX1aJCbt5KMibuKb+d7j1JaOJG6s2UjX1PQlW+OKB/sD4a/5ZYF4RcmYmLSndOoU3Lt/3g== "js-tokens@^3.0.0 || ^4.0.0": version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== loose-envify@^1.1.0: version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== dependencies: js-tokens "^3.0.0 || ^4.0.0" lru-cache@^6.0.0: version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== dependencies: yallist "^4.0.0" nanoid@^3.3.4: version "3.3.6" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" + resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz" integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== next-auth@^4.22.1: version "4.22.1" - resolved "https://registry.yarnpkg.com/next-auth/-/next-auth-4.22.1.tgz#1ea5084e38867966dc6492a71c6729c8f5cfa96b" + resolved "https://registry.npmjs.org/next-auth/-/next-auth-4.22.1.tgz" integrity sha512-NTR3f6W7/AWXKw8GSsgSyQcDW6jkslZLH8AiZa5PQ09w1kR8uHtR9rez/E9gAq/o17+p0JYHE8QjF3RoniiObA== dependencies: "@babel/runtime" "^7.20.13" @@ -173,9 +138,9 @@ next-auth@^4.22.1: preact-render-to-string "^5.1.19" uuid "^8.3.2" -next@13.4.2-canary.5: +"next@^12.2.5 || ^13", next@13.4.2-canary.5: version "13.4.2-canary.5" - resolved "https://registry.yarnpkg.com/next/-/next-13.4.2-canary.5.tgz#3971785161e977ccbae63611dbeeaa07567ec25d" + resolved "https://registry.npmjs.org/next/-/next-13.4.2-canary.5.tgz" integrity sha512-GlT5MweOGIuI1oMekPwuhlaKe4A04xyZvjSHAmimusJAK0bdQ2P0lnbHxjrCr89vKUOXYIW5N89EsD7puvMkXQ== dependencies: "@next/env" "13.4.2-canary.5" @@ -198,22 +163,22 @@ next@13.4.2-canary.5: oauth@^0.9.15: version "0.9.15" - resolved "https://registry.yarnpkg.com/oauth/-/oauth-0.9.15.tgz#bd1fefaf686c96b75475aed5196412ff60cfb9c1" + resolved "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz" integrity sha512-a5ERWK1kh38ExDEfoO6qUHJb32rd7aYmPHuyCu3Fta/cnICvYmgd2uhuKXvPD+PXB+gCEYYEaQdIRAjCOwAKNA== object-hash@^2.2.0: version "2.2.0" - resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.2.0.tgz#5ad518581eefc443bd763472b8ff2e9c2c0d54a5" + resolved "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz" integrity sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw== oidc-token-hash@^5.0.3: version "5.0.3" - resolved "https://registry.yarnpkg.com/oidc-token-hash/-/oidc-token-hash-5.0.3.tgz#9a229f0a1ce9d4fc89bcaee5478c97a889e7b7b6" + resolved "https://registry.npmjs.org/oidc-token-hash/-/oidc-token-hash-5.0.3.tgz" integrity sha512-IF4PcGgzAr6XXSff26Sk/+P4KZFJVuHAJZj3wgO3vX2bMdNVp/QXTP3P7CEm9V1IdG8lDLY3HhiqpsE/nOwpPw== openid-client@^5.4.0: version "5.4.2" - resolved "https://registry.yarnpkg.com/openid-client/-/openid-client-5.4.2.tgz#8692bcc2a40ef3426c5ba5c11f7493599e93ccc7" + resolved "https://registry.npmjs.org/openid-client/-/openid-client-5.4.2.tgz" integrity sha512-lIhsdPvJ2RneBm3nGBBhQchpe3Uka//xf7WPHTIglery8gnckvW7Bd9IaQzekzXJvWthCMyi/xVEyGW0RFPytw== dependencies: jose "^4.14.1" @@ -223,12 +188,12 @@ openid-client@^5.4.0: picocolors@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== postcss@8.4.14: version "8.4.14" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.14.tgz#ee9274d5622b4858c1007a74d76e42e56fd21caf" + resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz" integrity sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig== dependencies: nanoid "^3.3.4" @@ -237,86 +202,86 @@ postcss@8.4.14: preact-render-to-string@^5.1.19: version "5.2.6" - resolved "https://registry.yarnpkg.com/preact-render-to-string/-/preact-render-to-string-5.2.6.tgz#0ff0c86cd118d30affb825193f18e92bd59d0604" + resolved "https://registry.npmjs.org/preact-render-to-string/-/preact-render-to-string-5.2.6.tgz" integrity sha512-JyhErpYOvBV1hEPwIxc/fHWXPfnEGdRKxc8gFdAZ7XV4tlzyzG847XAyEZqoDnynP88akM4eaHcSOzNcLWFguw== dependencies: pretty-format "^3.8.0" -preact@^10.6.3: +preact@^10.6.3, preact@>=10: version "10.13.2" - resolved "https://registry.yarnpkg.com/preact/-/preact-10.13.2.tgz#2c40c73d57248b57234c4ae6cd9ab9d8186ebc0a" + resolved "https://registry.npmjs.org/preact/-/preact-10.13.2.tgz" integrity sha512-q44QFLhOhty2Bd0Y46fnYW0gD/cbVM9dUVtNTDKPcdXSMA7jfY+Jpd6rk3GB0lcQss0z5s/6CmVP0Z/hV+g6pw== pretty-format@^3.8.0: version "3.8.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-3.8.0.tgz#bfbed56d5e9a776645f4b1ff7aa1a3ac4fa3c385" + resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-3.8.0.tgz" integrity sha512-WuxUnVtlWL1OfZFQFuqvnvs6MiAGk9UNsBostyBOB0Is9wb5uRESevA6rnl/rkksXaGX3GzZhPup5d6Vp1nFew== -react-dom@18.2.0: +"react-dom@^17.0.2 || ^18", react-dom@^18.2.0, react-dom@18.2.0: version "18.2.0" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" + resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz" integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g== dependencies: loose-envify "^1.1.0" scheduler "^0.23.0" -react@18.2.0: +"react@^17.0.2 || ^18", react@^18.2.0, "react@>= 16.8.0 || 17.x.x || ^18.0.0-0", react@18.2.0: version "18.2.0" - resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" + resolved "https://registry.npmjs.org/react/-/react-18.2.0.tgz" integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== dependencies: loose-envify "^1.1.0" regenerator-runtime@^0.13.11: version "0.13.11" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" + resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz" integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== scheduler@^0.23.0: version "0.23.0" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" + resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz" integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw== dependencies: loose-envify "^1.1.0" source-map-js@^1.0.2: version "1.0.2" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== streamsearch@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764" + resolved "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz" integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg== styled-jsx@5.1.1: version "5.1.1" - resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.1.1.tgz#839a1c3aaacc4e735fed0781b8619ea5d0009d1f" + resolved "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz" integrity sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw== dependencies: client-only "0.0.1" tslib@^2.4.0: version "2.5.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" + resolved "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz" integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== typescript@5.0.4: version "5.0.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" + resolved "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz" integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== uuid@^8.3.2: version "8.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== yallist@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== zod@3.21.4: version "3.21.4" - resolved "https://registry.yarnpkg.com/zod/-/zod-3.21.4.tgz#10882231d992519f0a10b5dd58a38c9dabbb64db" + resolved "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz" integrity sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==