-
Notifications
You must be signed in to change notification settings - Fork 436
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
checkAuth returning null when href target="_blank" #983
Comments
Hey thanks, will talk to @damienbod and look into this. |
Verified this bug occurs even with default storage setting (session). Steps to reproduce are simple, just add |
Hey, I could not reproduce the issue the way you described. What I did was that I opened a "normal" popup via |
Appreciate the quick fix. I'm surprised you could not reproduce, as all you have to do is add |
Yeah but maybe we have different browser settings concerning to popups ;) Also I am wondering what a backslash as link should do as you mention a normal slash in the first post. But I got the idea I think. I think I could reproduce it and hopefully fixed it :-) You can test btw and let us know! |
Verified the PR fixes the issue. Thanks for such a fast turnaround. |
Above issue still happening for the sample-code-flow-auto-login project, list of changes i've made in sample below home.component.html
home.component.ts
here localhost:4200 is another application having same clientId |
Hey @abdulfousan , if you open up a new window this is a completely new instance. You are not authenticated in there. You can add a |
Describe the bug
The OidcSecurityService.checkAuth() returns null when a tab is opened by clicking an href with target="_blank". Since storage=localstorage, it should return true, not null.
To Reproduce
Steps to reproduce the behavior:
<a href="/" target="_blank">My Link</a>
Expected behavior
Since storage is localstorage, the new tab should know we are authenticated and checkAuth() should return true.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
If the tab is opened by right click, "open link in new tab", it works (instead of regular left click).
I think the problem is the library thinks the new tab is a popup. From CheckAuthService:
But it probably shouldn't be doing this when storage=localstorage?
The text was updated successfully, but these errors were encountered: