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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to access updated cookies in the Middleware of NextJs #571

Open
MarkBuoy opened this issue Apr 5, 2023 · 2 comments
Open

How to access updated cookies in the Middleware of NextJs #571

MarkBuoy opened this issue Apr 5, 2023 · 2 comments

Comments

@MarkBuoy
Copy link

MarkBuoy commented Apr 5, 2023

I am setting cookies on the Client side with the package "nookies". Right after that, I redirect the user to another page and trigger the middleware that retrieves the current cookies.
The cookies don't contains the updated cookies, is there something I do wrong in my flow?

Thank you in advance for your help!

@martinIvovIv
Copy link

@MarkBuoy Are the cookies HttpOnly ? Can you post an example of how you're updating the cookies.
Otherwise I believe this package uses the cookie library if you need examples but probably you've already tried most things.

@Jscripter-pk
Copy link

@MarkBuoy Did you get the fix for your use-case as I am facing the same issue from last 2 days. 😔

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

No branches or pull requests

3 participants