哪个应用程序需要客户端密码、web、SPA、API(比如 dotnet core web api)?

Which application needs a client secret, web, SPA, API (like dotnet core web api)?

This article explains how to register a web application. It's no clear whether by web, it includes SPA (Angular and React) and API (something like Dotnet core web API). Even this sample application 上不包含秘密。

我的理解是秘密就像应用程序的密码。但是,哪种类型的应用程序需要它,服务器端 Web 应用程序(ASP.NET MVC,ASP.NET WEB API),像 SPA Angular?

感谢您的帮助

永远不要在 SPA 中保密。 任何查看该应用程序的人都可以看到它。 这同样适用于任何其他“public 客户端应用程序”,即在用户设备上运行的应用程序。

后端服务器应用程序在需要向身份提供者验证自身时需要密码或证书。 因此,如果后端应用程序需要获取访问令牌,则需要一个秘密。

例如,

ASP.NET Web API 可能不需要密码。 如果它不调用任何下游 APIs,它只需要验证传入的令牌,它可以在没有秘密的情况下进行。