Microsoft-authentication-library-for-js: MsalGuard to support redirect on failure

Created on 10 May 2019  路  10Comments  路  Source: AzureAD/microsoft-authentication-library-for-js

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Browser:

  • [x] Chrome version 74.0.3729.131
  • [ ] Firefox version XX
  • [ ] IE version XX
  • [ ] Edge version XX
  • [ ] Safari version XX

Library version

@azure/msal-angular
Library version: 0.1.2

Expected behavior

It would be neat if the MsalGuard would support redirecting to an access denied page. The CanActivate interface supports returning a UrlTree. I believe this was added in Angular v7.1.

So if we can have MsalConfig.failureRedirectUri = "access-denied-page" that would be a lot simpler then having to subscribe to the failure event.

feature msal-angular

Most helpful comment

@snebjorn Thank you for sharing your thoughts. We are currently finishing up work on our msal-core library, and will begin work on msal-angular this summer. We will consider your suggestion, and investigate the impact on the library.

cc @negoe

All 10 comments

@snebjorn Thank you for sharing your thoughts. We are currently finishing up work on our msal-core library, and will begin work on msal-angular this summer. We will consider your suggestion, and investigate the impact on the library.

cc @negoe

Would you accept a PR on this? As this will probably introduce breaking changes.

We are always open to pull requests, but I think as it stands right now, will not be releasing breaking changes until 1.0.0 (or the final preview). We will be working to communicate more about timeline, and keep the feature top of mind as we plan what developers need!

Link to #786. Tracking as a feature ask.

linked in #786 closing this

We did not get to this in MSAL Angular v1, but is a follow up improvement we want to make. Reopening and tracking.

@jasonnutter I already have a working version of this based on the new MsalGuard. I can make a PR or at least share the solution. Interested?

@snebjorn A PR would great, thanks!

Is there any progress on this feature?

Was this page helpful?
0 / 5 - 0 ratings