【发布时间】:2020-08-29 21:43:46
【问题描述】:
使用 ASP.NET Core 3.1 和 Identity Server 4,我从 SPA 开始登录过程。
登录后,我对 IS4 应用身份验证 cookie 有以下声明:
sub 1
AspNet.Identity.SecurityStamp RRHNY65RQMUHTXXSIZKT2YORA3QQ2WAC
role Admin
preferred_username info@example.com
name info@example.com
email info@example.com
email_verified true
amr pwd
idp local
auth_time 1598736198
为什么name 声明将电子邮件作为其值?
然后我实现了 ProfileService 以将 name 声明替换为实际用户名。
当我检查水疗中心的索赔时,更换已经完成......
但在 IS4 应用程序上,身份验证 Cookie 仍会收到电子邮件为 name 声明。
为什么?
【问题讨论】:
标签: identityserver4 asp.net-core-3.1 asp.net-core-identity