You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change drops tenant-aware client resolution, so every login will use the same Keycloak client regardless of tenant. In a multi-tenant flow, that can send users to the wrong client configuration and break authentication or token validation.
Why: The PR removes tenantId from the constructor and hardcodes clientId, which can break existing multi-tenant Keycloak client resolution. The suggestion is consistent with the removed logic and addresses a likely authentication regression.
Medium
Recreate service for config changes
Returning a single cached instance without considering tenant or client changes means the first initialized tenant/client can be reused for later requests. That can cause cross-tenant authentication, refresh, and logout calls to run against the wrong Keycloak configuration.
Why: Caching a single KeycloakService instance regardless of url, realm, or clientId can reuse the wrong configuration on later calls. The suggestion directly fixes a real correctness issue in getInstance, especially for multi-client or multi-tenant flows.
Medium
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
📝 Pull Request Summary
Description:
Unified login experience for multitenant environment
Related Jira Ticket:
Type of Change:
🧩 Microfrontends Affected
Please select all microfrontends or modules that are part of this change:
Details (if Others selected):
🧠 Summary of Changes
Updated keycloak service to always use default client and not use
${tenantId}-<default-client>🧪 Testing Details
Testing Performed:
Screenshots (if applicable):
✅ Checklist
👥 Reviewer Notes
PR Type
Bug fix, Enhancement
Description
Use shared Keycloak client across tenants
Remove
tenantIdfrom service creationLog token parse failures before logout
Diagram Walkthrough
File Walkthrough
KeycloakService.ts
Simplify Keycloak client selection for tenantsforms-flow-service/src/keycloak/KeycloakService.ts
tenantIdfrom the constructor signaturetenantIdfromgetInstanceparametersclientIdto the default value