PHEE-381: implement in-app Keycloak auth using ROPC flow - #10
Merged
Merged
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Related
Epic: PHEE-363
Closes: PHEE-379
Summary
Implements full in-app Keycloak authentication using the OAuth2
Resource Owner Password Credentials (ROPC) flow — users authenticate
entirely within our branded UI without being redirected to Keycloak's
login page.
Changes
Keycloak Integration
src/lib/keycloak/keycloak.ts— Keycloak singleton instancesrc/lib/keycloak/KeycloakProvider.tsx— initializes Keycloakwith
check-sso, protects all app routes, handles token storagesrc/lib/keycloak/useAuth.ts—useAuth()hook exposingauthenticated,token,user,logout,hasRoleLogin Page
to Keycloak token endpoint
API Client
src/lib/api/client.ts— changed tenant header toPlatform-TenantId, addedAuthorization: Bearer <token>from localStorage
AppLayout
useAuthkeycloak.logout()Export Features
src/lib/exportCsv.ts— CSV export utilitysrc/lib/exportPdf.ts— PDF export utilityAccount Mapper Self Service Portal
src/modules/account-mapper/SelfServicePortal.tsx/account-mapper/self-serviceNotes
paymenthubrealm and
opsappclient