-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
callback_url never stored in cookies #23
Comments
Hi! This is a bigger issue than I realised and I've opened an issue to track it there unjs/h3#439 Response support has landed in h3 and it will be out in the next release : unjs/h3#436 |
0.1.5 worked as expected |
Yes this got fixed in 0.1.7, sorry about that. |
no it doesnot fix the issue.
was solving the issue. Set-Cookie header is just one header with all the cookie combined in it. you cannot loop through setting this header, you have to combine them and set or if you wish to loop through you need to append. |
@dutsik this code is still present
Are you still experiencing the issue ? |
No it doesn’t work I guess you need to revert back the part that process cookie headers separately. Or loop through the ‘response.headers.entries()’ instead of ‘response.headers’, but I am not familiar with that part |
The logic is exactly the same and work on my end, can you please provide me with a reproduction repo/stackblitz? There could be a bug with h3 I just pushed 0.1.8, let me know if that fixes it for you @dutsik. |
I created the sandbox for you. Here is what we have:
the problem is not with split cookie, but with the loop. output into the console key values, i am getting 'set-cookie' key at least twice with different values and only the last one used... |
@dutsik Thank you so much, I've been able to reproduce the issue locally. It will be fixed in 0.1.9, and I pushed a similar fix to H3.
This is now fixed in 0.1.9 |
Environment
node: 18.16.1
Reproduction
I am using signin helper with custom callback_url like this:
but this callback never triggered. instead you get to a default home page.
Describe the bug
I can assume that it should be stored in cookie before we do an actual redirect to auth provider page. but it is not... it is basically overwriten while copying cookie headers in utility function respondWithResponse and only the last cookie is stored
packages/authjs-nuxt/src/runtime/utils.ts#L83
i beleive that the straight forward fix would be smth like this:
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: