Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for new req.cookie interface #894

Merged
merged 4 commits into from Nov 2, 2022
Merged

Fix for new req.cookie interface #894

merged 4 commits into from Nov 2, 2022

Conversation

adamjmcgrath
Copy link
Contributor

馃搵 Changes

req.cookies no longer extends Map, but correctly implements getAll

馃搸 References

https://nextjs.org/docs/api-reference/next/server#nextrequest
fixes #892

馃幆 Testing

Updating to next@13.0.1 broke the with-middleware-auth-required suite and these changes fix it.

@adamjmcgrath adamjmcgrath added the review:small Small review label Nov 2, 2022
@adamjmcgrath adamjmcgrath requested a review from a team as a code owner November 2, 2022 10:49
@vercel
Copy link

vercel bot commented Nov 2, 2022

The latest updates on your projects. Learn more about Vercel for Git 鈫楋笌

1 Ignored Deployment
Name Status Preview Updated
nextjs-auth0 猬滐笍 Ignored (Inspect) Nov 2, 2022 at 11:17AM (UTC)

@adamjmcgrath adamjmcgrath merged commit f0a584e into vNext Nov 2, 2022
@adamjmcgrath adamjmcgrath deleted the next-13.0.1 branch November 2, 2022 12:27
This was referenced Nov 2, 2022
@loganpowell
Copy link

loganpowell commented May 26, 2023

we're still getting this error when using middleware:

 return withMiddlewareAuthRequired(async function middleware(req) {...

returns:

error - TypeError: legacyCookies.keys is not a function
    at MiddlewareCookies.getAll (/Users/.../node_modules/@auth0/nextjs-auth0/dist/utils/middleware-cookies.js:28:41)
    at StatelessSession.<anonymous> (/Users/.../node_modules/@auth0/nextjs-auth0/dist/auth0-session/session/stateless-session.js:217:40)

deps:

    "dependencies": {
        "@auth0/nextjs-auth0": "^2.4.0",
        "cookie": "^0.5.0",
        "next": "^13.2.1"
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review:small Small review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants