IdentityServer4 登录跳转问题(Identity server 4 login jump problem)

问题起因:在使用IdentityServer4对mvc做登录认证时,起初使用的是https,后来为了方便抓包查看数据改为http,导致登录后跳转不回mvc。

问题原因:Chrome高版本调整SameSite策略导致。

解决办法参考:https://asdfg.blog.csdn.net/article/details/108514763?utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-2.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-2.control

注意:IdentityServer4项目 和 mvc项目都要注册和配置链接中提供的扩展方法。最直接的办法还是将域名升级为HTTPS。。。

————————

Cause of the problem: when using identityserver4 to log in and authenticate MVC, HTTPS was used at first. Later, in order to facilitate packet capture and view data, it was changed to HTTP, resulting in no return to MVC after logging in.

Cause of the problem: the samesite policy is adjusted in the higher version of chrome.

解决办法参考:https://asdfg.blog.csdn.net/article/details/108514763?utm_medium=distribute.pc_relevant.none-task-blog-OPENSEARCH-2.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-OPENSEARCH-2.control

Note: both the identity server 4 project and the MVC project need to register and configure the extension methods provided in the link. The most direct way is to upgrade the domain name to HTTPS…