❔ How to pass cookies from .NET application to Next.js app?
I am trying to troubleshoot this problem in weeks and ended up here... Please help: https://stackoverflow.com/questions/77040516/how-to-pass-cookies-from-net-application-to-next-js-app
Stack Overflow
How to pass cookies from .NET application to Next.js app?
My app contains client side (written in Next.js; http) and server side (.NET; https)
I am trying to do authorization, but can't properly pass the cookies from one side to another. It is important to
11 Replies
it's supposed to be automatic with fetch 🤔
Well yes it is, but due to some mysterious reasons I can't get data from server app cookies in client side app
in the response you don't have any cookie ?
In the response I don't have any data at all, as it is stored in cookies, yes
I mean you should have the set-cookie header at least in the response
In controllers methods I use HttpContext.SignInAsync() and then get the data by User.Identity
how do i check that?
inspect the response in the network tabs
(it's not an auth request just a random one, you have request header then response header)
I have no idea how did I, but I did fix it
By the way, I don't know would I do that without your responses and questions, so thanks a lot! I think you had an impact in this 🙂
now you know you can check the cookies on headers response 👌
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.