【发布时间】:2021-05-11 05:51:15
【问题描述】:
我有 2 个 asp.net 核心 Web 应用程序:REST API 和 React UI。 React UI 使用默认的Individual User Accounts 选项进行身份验证。它们是单独的解决方案。
我想要的是使用此默认身份验证在 API 中进行身份验证。但我不知道我该怎么做。所以我想要的是Make a call from UI -> Grab user credentials -> Go to API method -> Validate user (e.g. role) -> Return response
据我所知,默认身份验证设置AspNetCore.Identity.Application cookie 用于在反应中进行身份验证。可能,我可以以某种方式解析它或仅使用它在 API 端进行身份验证。我以为是 JWT 令牌,但好像不是
【问题讨论】:
标签: reactjs authentication asp.net-web-api