msal-angular 包是否支持使用 PKCE 的授权代码流?

Do msal-angular package supports Authorization code flow using PKCE?

我在 Azure 活动目录中注册了两个应用程序,一个代表客户端,另一个代表后端 Web api。现在我有一个 angular SPA,我想在其中使用 MSAL angular 库来支持授权代码流,使用 PKCE 获取授权代码并兑换它并获得 auth_token、id_token 和刷新令牌。那有可能吗?我不太确定如何处理这个?

将 MSAL.js 与 Angular

结合使用

当前 MSAL.js 2.x (msal-browser) 实现授权代码 (w/ PKCE) 流程。还有一个MSAL-Angular wrapper library, which comes with some extra features and glue code, and that is the one that implements implicit flow (because it is based on MSAL.js 1.x aka msal-core). However, you don't have to use it just because you have an Angular project. Instead, you can create your own authentication service using MSAL.js 2.x directly.please refer to this similar question for information