Skip to content

fix(next): correctly parse headers with RSC #5753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 7, 2022
Merged

Conversation

balazsorban44
Copy link
Member

@balazsorban44 balazsorban44 commented Nov 7, 2022

We weren't correctly parsing headers and it caused issues when deployed.

Also, authOptions is not required anymore

- import { authOptions } from "pages/api/auth/[...nextauth]"

export default async function Page() {
-  const session = await unstable_getServerSession(authOptions)
+  const session = await unstable_getServerSession()
...
}

☕️ Reasoning

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

Please scout and link issues that might be solved by this PR.

Fixes: INSERT_ISSUE_LINK_HERE

📌 Resources

Sorry, something went wrong.

@vercel
Copy link

vercel bot commented Nov 7, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated
next-auth ⬜️ Ignored (Inspect) Nov 7, 2022 at 8:16PM (UTC)

@github-actions github-actions bot added the core Refers to `@auth/core` label Nov 7, 2022
@balazsorban44 balazsorban44 temporarily deployed to Preview November 7, 2022 20:07 Inactive
@github-actions
Copy link

github-actions bot commented Nov 7, 2022

🎉 Experimental release published 📦️ on npm!

pnpm add next-auth@0.0.0-pr.5753.2b78e705
yarn add next-auth@0.0.0-pr.5753.2b78e705
npm i next-auth@0.0.0-pr.5753.2b78e705

@balazsorban44 balazsorban44 marked this pull request as ready for review November 7, 2022 20:16
@balazsorban44 balazsorban44 merged commit 782812a into main Nov 7, 2022
@balazsorban44 balazsorban44 deleted the fix/headers-rsc branch November 7, 2022 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Refers to `@auth/core`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant