Can't add jwt to cookies
Can someone explain why I have queries working when using IIS Express on BackEnd if I use axios in Vue, but if I use normal fetch, errors appear. I would keep using axios but when I want to add jwt token to cookie the same error appears. Any help would be greatly appreciated))
Modified*
All requests work in postman, cookies are added and deleted, but errors appear when working with the browser, so I'm leaning towards not adding something in the app.Cors or builder.Services.AddCors settings
15 Replies
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
It stopped working on adding Cookie, so I wrote it. :catclown:
I changed it to http and it stopped working at all
Okay, it works with axios but doesn't with fetch. However, why it doesn't work with fetch?
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
After reading documentation, I added some code but it still doesn't work)) It works but I don't get jwt in cookies
.
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
What makes you think the error is on the site side? Backend requests are not working
TreF01L
Okay, it works with axios but doesn't with fetch. However, why it doesn't work with fetch?
Quoted by
<@689473681302224947> from #Can't add jwt to cookies (click here)
React with ❌ to remove this embed.
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
I found the mistake myself, I should have added everything to the project in a different order
how it was
how it works
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View