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

Fix regression in the check session service #1440

Merged
merged 1 commit into from
May 21, 2022
Merged

Fix regression in the check session service #1440

merged 1 commit into from
May 21, 2022

Conversation

Guerric-P
Copy link

@Guerric-P Guerric-P commented May 16, 2022

In this commit: 5c57084900237245e0fe3b7db58cc188f4f5fe75 the code was refactored in order to retrieve the reference to the browser's global variables via Angular's dependency injection.

In this line: 5c57084#diff-dec315070d26d82195b08309ea5550cfd8d36e230b58ab9ddb59a401fe9ff3a4L185, window was replaced with this.document which is wrong because the events of type message are being emitted by window, not document.

That prevents the library from receiving response message events from the iframe, which causes these errors in the console:

[ERROR] 0-app- CheckSession - OidcSecurityCheckSession not receiving check session response messages. Outstanding messages: '12'. Server unreachable?

It also very probably prevents the check session mechanism from working at all.

My pull request fixes this by replacing this.document with this.document.defaultView, an actual reference to window.
It fixes #1428

@FabianGosebrink FabianGosebrink merged commit 9c1546a into damienbod:main May 21, 2022
@FabianGosebrink
Copy link
Collaborator

Thanks!!!

@Guerric-P
Copy link
Author

You're welcome! May I ask when do you plan to release a version?

@FabianGosebrink
Copy link
Collaborator

I think we can do this in the next days. Thanks!

@Guerric-P
Copy link
Author

Ok 👌 thank you too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: CheckSession errors upgrading from v13.1 -> v14.0
2 participants