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.

After successful login and redirection, the execution of the routing guard is interrupted.

See original GitHub issue

Core Library

MSAL.js v2 (@azure/msal-browser)

Core Library Version

2.26.0

Wrapper Library

Not Applicable

Wrapper Library Version

None

Description

HI,

I have a sign in page. When you visit the website without authentication, you will be redirected to this page.

When I click sign in to enter the login process and successfully authenticate and jump back to my website, there seems to be a problem with the routing guard, which makes me return to the sign in page.

I need to enter the home page after successful authentication. I don’t know how to implement it.

But in fact, the login is successful. When I visit the website again, I can get the login user information. It seems that it is not waiting for the execution of handleredirectpromise at the routing guard.

The source code is here vue3-sample-app.zip .

MSAL Configuration

No response

Relevant Code Snippets

No response

Identity Provider

No response

Source

External (Customer)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
tnorlingcommented, Jul 18, 2022

@zico209 Can you please provide your configuration and your routing guard implementation so I can better assist you? Have you seen our Vue3 sample, which implements a routing Guard here?

0reactions
zico209commented, Jul 25, 2022

@tnorling Thank you! This is really helpful.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular2 - Redirect to calling url after successful login
One possible way to achieve this is by using your AuthGuard to check for your login status and store the url on your...
Read more >
CanActivate not called on redirectTo router rule; but no error ...
My Guard is not getting executed at all. In my case I don't want to redirect just validate access to route base on...
Read more >
Vue SPA, router guard with redirect after login
If User is authenticated then go to the requested page or redirect to /login page. Once the user has successfully logged in redirect...
Read more >
Better Redirects in Angular Route Guards | juri.dev
Learn how to properly redirect in an Angular route guard.
Read more >
Protecting Vue Routes with Navigation Guards - CSS-Tricks
A common practice that applications use to protect content is to house them under specific routes and build redirect rules that navigate users ......
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