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

Proposition: don't wait for Keycloak's initialization #554

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

DanielKucal
Copy link

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?
Improved setup instructions.

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[X] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Currently if 3rd party cookies are disabled (e.g. on Safari) when opening Keycloak-secured app using 'check-sso' on load, app initialization NEVER completes when silentCheckSsoFallback is turned off or redirects user to login page (which can be just an "Invalid credentials" error page when login+password login is disabled) and he can never go back, because of this immediate redirect.

There's an underlaying issue in keycloak-js, which doesn't handle failed GET /realms/${realmName}/protocol/openid-connect/auth request correctly, just silences it.

Issue Number: #544

What is the new behavior?

App doesn't wait for Keycloak initialization, so it doesn't break, but it may not be a proper solution when using `onLoad: 'login-required'

Does this PR introduce a breaking change?

[ ] Yes
[X] No

Screen recording of described behaviors

image

Copy link

@blmarquess blmarquess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes solved my problem.

@mauriciovigolo mauriciovigolo self-assigned this Jun 16, 2024
@mauriciovigolo mauriciovigolo added enhancement This issue/PR is an enhancement or new feature. evaluate-in-next-version Evaluate if the feature or change might be included in the next library release. labels Jun 16, 2024
@mauriciovigolo mauriciovigolo modified the milestone: v16.0.0 Jun 16, 2024
@mauriciovigolo
Copy link
Owner

Thank you @DanielKucal!

I wanted to have this fix in v16, but first I need to find a solution for the onLoad: 'login-required' issue.
Since I'm working on the refactoring of the library I will take this into account for the new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue/PR is an enhancement or new feature. evaluate-in-next-version Evaluate if the feature or change might be included in the next library release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants