Francessco121 / msal-js-dart

A Dart wrapper for the "Microsoft Authentication Library for JavaScript (MSAL.js)".
https://pub.dev/packages/msal_js
MIT License
14 stars 9 forks source link

Support for MSAL 2.x #19

Closed kubaprzetakiewicz closed 3 years ago

kubaprzetakiewicz commented 3 years ago

As in the topic, is the support for MSAL 2.x (msal-browser) planned?

Francessco121 commented 3 years ago

I'd love to support msal-browser at some point, though I'm not sure if this package is the right place for it. MSAL 1.x and 2.x are still being developed side-by-side making it a little difficult to jump to 2.x here.

Ideally, it would be nice to have 2.0 of this package move over to MSAL 2.x as well as use Dart null-safety since that also requires a major version bump.

mick-stokes commented 3 years ago

MSAL 2 support would also mean the user does not have to select the AAD account to logout from. This can be specified by getting the account name from the current logged in account.

Francessco121 commented 3 years ago

An update on this:

It looks like MSAL 2.x is meant to replace 1.x and msal-browser isn't just another package they're making in parallel, therefore supporting 2.x here makes sense. I find this especially important since the implicit OAuth flow is no longer recommended for web apps and MSAL 2.x uses the new secure PKCE OAuth flow instead. Right now, this package only supporting 1.x forces users into the implicit flow.

If anyone's wondering why it's taking so long to get this done... I don't actually personally use MSAL any longer. However, I really don't want this to become yet another discontinued Dart package so, here's the plan:

  1. I plan on getting the ball rolling and upgrading this package to support the current version of MSAL 2.x.
  2. After, changes will be made to make it easier for others to contribute to this project going forward.
  3. From then on, hopefully, contributions will be a mix of myself and others to support new MSAL features as they're added to the underlying library.
Francessco121 commented 3 years ago

MSAL 2.x support is officially done and published!

This is a pretty big update, so please don't hesitate to open issues if you run into problems!