mvertopoulos / vue-msal

Vue plugin for using Microsoft Authentication Library (MSAL)
MIT License
123 stars 66 forks source link

Support for MSAL.js 2.0? #27

Open ghost opened 4 years ago

ghost commented 4 years ago

Hi there,

Any plans to support MSAL.js 2.0?

Thanks!

philtweir commented 4 years ago

I'll need to take a look at this myself for our own work - keen to submit a PR if it would help, but if there are any thoughts or on-going efforts, also keen to avoid duplication.

Will get started, but - @mvertopoulos - are there any particular requirements or structuring I might miss? (or WIP?)

ghost commented 4 years ago

I'm not aware of any WIP ...

philtweir commented 4 years ago

Good progress here: https://github.com/flaxandteal/vue-msal/tree/feature/msal2 -- I am able to log in and out with MSAL 2.

As our team's target is B2C, we have had to wait a bit longer for support in MSAL.js 2.x.x, but it seems to be getting there. However, there is still a blocker: https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/1795 For the moment, that means that the only way of testing is to have a proxy token endpoint (e.g. a simple pass-through Azure Function), and override MSAL's token endpoint. There is a commit to do that, which needs to be removed as soon as that issue is resolved.

Feedback on the rest would be appreciated. Key points:

If the general approach looks acceptable, I can open a PR - still a fair bit of tidy up and testing to do, but as long as there's something to iterate, that seems sensible - will wait for some feedback though.


Broader context for anyone who hasn't been hit by this: since ITP 2.3 came into Safari (March), the Implicit Code Flow has been blocked. This means apps built on MSAL.js 1.x (e.g. current vue-msal apps) will not work on e.g. recent iPhones without users actively disabling security in their browser settings. MS are only targetting the fix at MSAL.js 2.x

philtweir commented 4 years ago

@mvertopoulos any thoughts on the above please? If it's broadly OK, I can get a PR together and tidied, hopefully in time for MSAL.js on B2C being solved -- MS are already doing a hard push on MSAL 2 while it's pre-release (and it looks like more browsers will be making MSAL 1 difficult), so it would be good to get ahead of that.

tylermurry commented 3 years ago

@philtweir / @mvertopoulos - The MS issue you linked to has been closed and I can personally confirm it has been solved in my own use-case (MSAL 2.0 library against a B2C tenant using PKCE is working great).

Has there been any progress on supporting @azure/msal-browser?

philtweir commented 3 years ago

I've not spent time on a pull request as there hasn't been any indication whether that'd be reviewed from @mvertopoulos - I see there's also https://github.com/yoerankaniok/vue-msal so not too sure what the best approach is, but there's not much option beyond consolidating around a fork if this repo isn't going to have MSAL2 support.