question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MsalGuard to support redirect on failure

See original GitHub issue

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:

  • 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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
DarylThayilcommented, May 10, 2019

@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

2reactions
jasonnuttercommented, Apr 30, 2020

@snebjorn A PR would great, thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

MSAL - MsalGuard on Redirect URI - getting into redirect loop
I'm implementing msal in my angular application and I'm using msal-v1 library. I have taken angular-7 sample from the documented samples and ...
Read more >
Handle errors and exceptions in MSAL.js - Microsoft Entra
For error handling in authentication flows with redirect methods ... calls to the Azure AD service, and occasionally failures can occur.
Read more >
Redirect to a custom login page when securing your Angular ...
Using MSAL Angular and MsalGuard is the easiest way to secure your Angular app with the Microsoft Identity Platform. But if you want...
Read more >
azure/msal-angular - npm
The latest @azure/msal-angular package does NOT support the implicit ... Using redirects · Using the MsalGuard · Using the MsalInterceptor ...
Read more >
Better Redirects in Angular Route Guards | juri.dev
Learn how to properly redirect in an Angular route guard. ... having multiple guards active doing async validation and redirects on failure.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found