更新时间:2023-02-15 21:14:06
使用 JWT (JSON Web Token).是 SPA 身份验证的理想解决方案.
Use JWT (JSON Web Token). It is the ideal solution for SPA auth.
.NET Core 端:
.NET Core Side:
Authorize
属性添加到您要保护的 API.Authorize
attribute to APIs you want to protect.Angular SPA 侧:
Angular SPA Side: