msgraph-sdk-javascript icon indicating copy to clipboard operation
msgraph-sdk-javascript copied to clipboard

Support for msal.js 2.0+

Open kunalkankariya opened this issue 6 years ago • 5 comments

Is there a plan to support msal.js 2.0+?

Since implicit grant flow is no longer recommended and auth code flow with PKCE is recommended.

kunalkankariya avatar Aug 26 '20 05:08 kunalkankariya

This is being looked into. I will let you know how we will plan to support Auth Code.

nikithauc avatar Aug 27 '20 05:08 nikithauc

Hi @kunalkankariya,

The plan to support MSAL 2.0 is still under discussion. However, currently we are working on including @azure/identity into Microsoft Graph JavaScript SDK. That should support auth code flow.

Please let me know if you have more questions.

nikithauc avatar Sep 22 '20 22:09 nikithauc

Thank you @nikithauc for the updates.

Does this mean that auth code flow will be used without PKCE? What will be the lifetime of refresh tokens then?

kunalkankariya avatar Sep 23 '20 07:09 kunalkankariya

Hello @kunalkankariya ,

You can use a credential class which suits your requirement. JS SDK will be implementing an authProvider class with TokenCredential property and a method to get the access token.
Also, if you do not find a credential class that suits your requirement, you can implement a custom authentication provider. Doc References which could help - Credential classes Documentation reference Azure Identity GitHub Sample

nikithauc avatar Sep 29 '20 07:09 nikithauc

Closing this issue. Please let me know if there are more questions.

nikithauc avatar Oct 05 '20 07:10 nikithauc