diff --git a/examples/auth/README.md b/examples/auth/README.md index 39e34bf7e16..30d196f4e4a 100644 --- a/examples/auth/README.md +++ b/examples/auth/README.md @@ -44,7 +44,7 @@ See the [Collections](https://payloadcms.com/docs/configuration/collections) doc import config from '../../payload.config' export default async function AccountPage({ searchParams }) { - const headers = getHeaders() + const headers = await getHeaders() const payload = await getPayload({ config: configPromise }) const { permissions, user } = await payload.auth({ headers }) diff --git a/examples/auth/src/app/(app)/account/page.tsx b/examples/auth/src/app/(app)/account/page.tsx index fe6132b87b4..96f39cdefbf 100644 --- a/examples/auth/src/app/(app)/account/page.tsx +++ b/examples/auth/src/app/(app)/account/page.tsx @@ -13,7 +13,7 @@ import { AccountForm } from './AccountForm' import classes from './index.module.scss' export default async function Account() { - const headers = getHeaders() + const headers = await getHeaders() const payload = await getPayload({ config }) const { permissions, user } = await payload.auth({ headers }) diff --git a/examples/auth/src/app/(app)/create-account/page.tsx b/examples/auth/src/app/(app)/create-account/page.tsx index cf27fa1906e..265dbdc20b7 100644 --- a/examples/auth/src/app/(app)/create-account/page.tsx +++ b/examples/auth/src/app/(app)/create-account/page.tsx @@ -10,7 +10,7 @@ import { CreateAccountForm } from './CreateAccountForm' import classes from './index.module.scss' export default async function CreateAccount() { - const headers = getHeaders() + const headers = await getHeaders() const payload = await getPayload({ config }) const { user } = await payload.auth({ headers }) diff --git a/examples/auth/src/app/(app)/login/page.tsx b/examples/auth/src/app/(app)/login/page.tsx index 9b183fa1ffb..6b506af1f88 100644 --- a/examples/auth/src/app/(app)/login/page.tsx +++ b/examples/auth/src/app/(app)/login/page.tsx @@ -10,7 +10,7 @@ import classes from './index.module.scss' import { LoginForm } from './LoginForm' export default async function Login() { - const headers = getHeaders() + const headers = await getHeaders() const payload = await getPayload({ config }) const { user } = await payload.auth({ headers }) diff --git a/examples/auth/src/app/(app)/logout/page.tsx b/examples/auth/src/app/(app)/logout/page.tsx index f47c5aba019..a775ae71a8a 100644 --- a/examples/auth/src/app/(app)/logout/page.tsx +++ b/examples/auth/src/app/(app)/logout/page.tsx @@ -9,7 +9,7 @@ import classes from './index.module.scss' import { LogoutPage } from './LogoutPage' export default async function Logout() { - const headers = getHeaders() + const headers = await getHeaders() const payload = await getPayload({ config }) const { user } = await payload.auth({ headers }) diff --git a/examples/auth/src/app/(app)/page.tsx b/examples/auth/src/app/(app)/page.tsx index c849be74196..9c967cfa8f9 100644 --- a/examples/auth/src/app/(app)/page.tsx +++ b/examples/auth/src/app/(app)/page.tsx @@ -8,7 +8,7 @@ import { Gutter } from './_components/Gutter' import { HydrateClientUser } from './_components/HydrateClientUser' export default async function HomePage() { - const headers = getHeaders() + const headers = await getHeaders() const payload = await getPayload({ config }) const { permissions, user } = await payload.auth({ headers }) diff --git a/examples/auth/src/app/(app)/recover-password/page.tsx b/examples/auth/src/app/(app)/recover-password/page.tsx index fd6b56f0c81..10bf06f6769 100644 --- a/examples/auth/src/app/(app)/recover-password/page.tsx +++ b/examples/auth/src/app/(app)/recover-password/page.tsx @@ -9,7 +9,7 @@ import classes from './index.module.scss' import { RecoverPasswordForm } from './RecoverPasswordForm' export default async function RecoverPassword() { - const headers = getHeaders() + const headers = await getHeaders() const payload = await getPayload({ config }) const { user } = await payload.auth({ headers }) diff --git a/examples/auth/src/app/(app)/reset-password/page.tsx b/examples/auth/src/app/(app)/reset-password/page.tsx index ae170fe59fc..62bb10e14c0 100644 --- a/examples/auth/src/app/(app)/reset-password/page.tsx +++ b/examples/auth/src/app/(app)/reset-password/page.tsx @@ -9,7 +9,7 @@ import classes from './index.module.scss' import { ResetPasswordForm } from './ResetPasswordForm' export default async function ResetPassword() { - const headers = getHeaders() + const headers = await getHeaders() const payload = await getPayload({ config }) const { user } = await payload.auth({ headers }) diff --git a/examples/auth/src/app/(payload)/admin/[[...segments]]/page.tsx b/examples/auth/src/app/(payload)/admin/[[...segments]]/page.tsx index 4ff779a080e..e59b2d3a84b 100644 --- a/examples/auth/src/app/(payload)/admin/[[...segments]]/page.tsx +++ b/examples/auth/src/app/(payload)/admin/[[...segments]]/page.tsx @@ -15,6 +15,7 @@ type Args = { [key: string]: string | string[] }> } + export const generateMetadata = ({ params, searchParams }: Args): Promise => generatePageMetadata({ config, params, searchParams })