C
C#15mo ago
SYKO

❔ 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
x0rld 👻 🎃
x0rld 👻 🎃15mo ago
it's supposed to be automatic with fetch 🤔
SYKO
SYKOOP15mo ago
Well yes it is, but due to some mysterious reasons I can't get data from server app cookies in client side app
x0rld 👻 🎃
x0rld 👻 🎃15mo ago
in the response you don't have any cookie ?
SYKO
SYKOOP15mo ago
In the response I don't have any data at all, as it is stored in cookies, yes
x0rld 👻 🎃
x0rld 👻 🎃15mo ago
I mean you should have the set-cookie header at least in the response
SYKO
SYKOOP15mo ago
In controllers methods I use HttpContext.SignInAsync() and then get the data by User.Identity how do i check that?
x0rld 👻 🎃
x0rld 👻 🎃15mo ago
inspect the response in the network tabs
x0rld 👻 🎃
x0rld 👻 🎃15mo ago
(it's not an auth request just a random one, you have request header then response header)
SYKO
SYKOOP15mo ago
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 🙂
x0rld 👻 🎃
x0rld 👻 🎃15mo ago
now you know you can check the cookies on headers response 👌
Accord
Accord15mo ago
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.
Want results from more Discord servers?
Add your server