Skip to content

feat: integrate keycloak oauth#1173

Closed
Mohmn wants to merge 1 commit intoGreenstand:hotfix/new-masterfrom
Mohmn:feat/integrate-keycloak-sso
Closed

feat: integrate keycloak oauth#1173
Mohmn wants to merge 1 commit intoGreenstand:hotfix/new-masterfrom
Mohmn:feat/integrate-keycloak-sso

Conversation

@Mohmn
Copy link
Member

@Mohmn Mohmn commented Mar 5, 2026

Description

  • Added Keycloak SSO integration (keycloak-js) with check-sso bootstrap and PKCE.
  • Moved auth initialization to app startup (src/index.js) before rendering routes.
  • Added clean auth routing flow:
    • LoginRoute starts SSO login
    • AuthCallback handles Keycloak callback and redirects back to original page
    • PrivateRoute simplified to guard-only behavior
  • Added axios auth client setup (authAxios / publicAxios) with:
    • token refresh via ensureFreshToken(30)
    • auth header attachment for protected requests
    • fallback to legacy token when Keycloak is disabled
    • redirect to /login on refresh failure
  • Refactored existing API/network calls from fetch to axios in API modules and related components/contexts (without introducing new backend endpoints).

Issue(s) addressed

  • Resolves #issue_number

What kind of change(s) does this PR introduce?

  • Enhancement
  • Bug fix
  • Refactor

Please check if the PR fulfils these 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)

Issue

What is the current behavior?

What is the new behavior?

Breaking change

Does this PR introduce a breaking change?

Other useful information

@Mohmn Mohmn requested a review from a team as a code owner March 5, 2026 21:43
@Mohmn Mohmn marked this pull request as draft March 5, 2026 21:43
@Mohmn Mohmn closed this Mar 8, 2026
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.

1 participant