从另一个端口验证 ASP.NET Core 应用程序
我有一个 asp.net core MVC 应用程序和一个 SPA 前端。我的 asp.net core MVC 应用程序在 44747 端口上运行,我的 SPA 应用程序在端口 3000 上运行。
从 MVC 登录后,我可以看到我的身份验证 cookie 在这些域之间共享,并且它使用 cors。
当我的 SPA 前端尝试发布操作时,它只是返回 302 重定向到登录页面。
如何让我的 MVC 接受 SPA 的 cookie 并保持其身份验证(至少对于开发模式)
I have an asp.net core MVC application and an SPA front-end. my asp.net core MVC application works on 44747 port, and my SPA application works on port 3000.
I can see my authentication cookies are shared among these domains after signing in from MVC, and it's using cors.
when my SPA front-end tries post to an action, it simply returns a 302 redirect to login page.
How can I make my MVC accept the cookies from SPA and keep it authenticated (At least for development mode)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论