I want to use msal.js 2.x (msal-browser) in an angular project to implement authorization code flow using PKCE. I am using Azure Active directory as an IAM. Please guide me if I am using the correct library or should I use a different library?
3 Answers
The Azure AD endpoints are based on standards based messages and you should be able to use any standards based JavaScript security library. If you can't get what you want from MSAL then OIDC Client is a good choice.
If it helps, I have an Azure SPA code sample that uses the above library and Authorization Code Flow (PKCE). You should be able to run it quite easily against your own Azure AD setup.
It is worth mentioning also that the library I am using works with any standards based provider, not just Azure AD.

- 22,534
- 2
- 12
- 24
The best way is to read Redirect URI: MSAL.js 2.0 with auth code flow
And please refer to this doc.

- 1,010
- 1
- 5
- 10
Currently, I dont have particular sample available to share that helps you with the combination of MSAL j.s 2.0 and Angular. But below solution will create a way to do it your self,
To implement Angular please take help of guide here and to implement PKCE implementation(written in JS) for the angular implementation please refer here

- 2,372
- 2
- 11
- 24