Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPA - unable to complete authentication from another route #316

Closed
jbockle opened this issue Jun 2, 2018 · 5 comments
Closed

SPA - unable to complete authentication from another route #316

jbockle opened this issue Jun 2, 2018 · 5 comments
Assignees

Comments

@jbockle
Copy link

jbockle commented Jun 2, 2018

I have a SPA with Aurelia, and configured it with MSAL.

When I load app from the base route http://localhost:8080 it authenticates user, then redirects to homepage and am able to get the logged in User and display it on navbar.

When I load from another route, like http://localhost:8080/#/counter, it authenticates user, redirecters to counter page, but getUser() returns null.

Is there something I'm missing that would prevent authentication from completing on a different route?

Sample Repository:
https://github.com/jbockle/aurelia-azure-active-directory

@jbockle
Copy link
Author

jbockle commented Jun 4, 2018

if loginInProgress I force a page reload and all is fine, not sure why that step is needed

@dougmolineux
Copy link

dougmolineux commented Jun 4, 2018

I couldn't get the hashtag to work in my Azure Angular 5 app either. I had to take out the useHash: true inside my app-routing.module.ts file. RouterModule.forRoot should define useHash as false by default.

@nehaagrawal
Copy link
Contributor

@dougmolineux There is an issue with angular library itself for hashbang urls. angular/angular#16710
We are currently waiting on them to fix it. If it doesn't get fix by angular team, we will provide a workaround.

@nehaagrawal nehaagrawal self-assigned this Jun 9, 2018
@navyasric
Copy link
Contributor

Closing this issue as the original issue seems to be resolved.

@tuanna2704
Copy link

I still have this problem when using useHash: true. Seemingly this issue cannot fix in angular 6 and more :(

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants