admin管理员组文章数量:1287791
I have an ASP.NET Web API and a react frontend, I hosted the backend on smarter asp and since I hosted, when I try to sign in using the frontend app, it fails to set the cookie in the browser, but I get success message saying I signed in.
- note that the server is using https and free ssl in smarter asp
- I used https aswell in the react app using mkcert
- I am using axios with use-credentials set to true
- issue only with the deployed API (works just fine locally)
This is the code to set the cookie :
private void SetAccessTokenInResponse(string accessToken)
{
Response.Cookies.Append(AccessTokenName, accessToken, new CookieOptions
{
HttpOnly = false,
Secure = true,
SameSite = SameSiteMode.None,
Expires = DateTime.Now.AddMinutes(15)
});
}
enter image description here
I am not sure whats causing this , so please help
本文标签: cCookies not being set in client browser from an ASPNET Web APIStack Overflow
版权声明:本文标题:c# - Cookies not being set in client browser from an ASP.NET Web API - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741260002a2367433.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论