Skip to content

EDFI-2786 Generalize Account Management link, remove Keycloak fallback - #214

Merged
jagudelo-gap merged 1 commit into
mainfrom
EDFI-2786-generalize-account-management-link
Aug 11, 2026
Merged

EDFI-2786 Generalize Account Management link, remove Keycloak fallback#214
jagudelo-gap merged 1 commit into
mainfrom
EDFI-2786-generalize-account-management-link

Conversation

@analiliagutierrez

@analiliagutierrez analiliagutierrez commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Removes the hardcoded Keycloak fallback for the frontend "Account Management" link in Admin App v4. The link's URL now comes solely from VITE_IDP_ACCOUNT_URL; when that value is not configured, the link is hidden instead of pointing users to an invalid Keycloak URL. This enables correct behavior for the newly supported non-Keycloak identity providers (e.g. Entra ID, Google Workspace).

Ticket

EDFI-2786 — Generalize the Account Management link (remove hardcoded Keycloak fallback)

Type of Change

  • Feature

What Changed

  • packages/fe/src/app/api/methods.tsIDP_ACCOUNT_URL is now string | undefined sourced directly from config.idpAccountUrl; the hardcoded https://localhost/auth/realms/edfi/account/ fallback is removed.
  • packages/fe/src/app/Pages/Account/ViewAccount.tsx — the "Account Management" section renders only when IDP_ACCOUNT_URL is set, so no broken link appears when the variable is unset.
  • packages/fe/.copyme.env.local — replaces the Keycloak example value with a comment documenting VITE_IDP_ACCOUNT_URL as optional and IdP-specific (Entra / Google / Keycloak examples), noting that leaving it unset hides the link.

Testing

Manual

The frontend was built and deployed over a local IIS install (https://localhost/adminapp/) and exercised with a real OIDC login (Entra ID):

  1. Build the frontend (nx run fe:build, base /adminapp/) and deploy it to the install.
  2. Set VITE_IDP_ACCOUNT_URL=https://myaccount.microsoft.com/ (runtime config.js), log in, navigate to /account.
    • Result: "Account Management" section is visible and links to the configured URL.
AdminApp-EntraID-2786
  1. Unset VITE_IDP_ACCOUNT_URL, reload /account.
    • Result: the "Account Management" section is hidden (no broken link).
EntraID-NoLink-2786

Follow-Up

Setting VITE_IDP_ACCOUNT_URL correctly per deployment is covered by EDFI-2774; this PR only changes the frontend behavior when the value is absent.

Checklist

  • Manually tested
  • Branch up to date with main
  • Commit history clean and includes ticket ID
  • No commented-out code or TODO comments
  • PR focused on this ticket only

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Admin App v4’s frontend “Account Management” link behavior to support non-Keycloak identity providers by removing the hardcoded Keycloak fallback URL and only showing the link when an IdP account URL is explicitly configured.

Changes:

  • Removed the Keycloak localhost fallback and sourced IDP_ACCOUNT_URL solely from config.idpAccountUrl.
  • Updated the Account page to conditionally render the “Account Management” section only when IDP_ACCOUNT_URL is present.
  • Updated the example frontend environment file to document VITE_IDP_ACCOUNT_URL as optional and IdP-specific.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/fe/src/app/Pages/Account/ViewAccount.tsx Hides the “Account Management” UI when no IdP account URL is configured to avoid broken links.
packages/fe/src/app/api/methods.ts Removes the hardcoded Keycloak fallback and makes IDP_ACCOUNT_URL optional (config-driven only).
packages/fe/.copyme.env.local Documents VITE_IDP_ACCOUNT_URL as optional with example values for multiple IdPs and notes that leaving it unset hides the link.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Test Results

  5 files  ±0  153 suites  ±0   3m 23s ⏱️ ±0s
796 tests ±0  796 ✅ ±0  0 💤 ±0  0 ❌ ±0 
872 runs  ±0  872 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 919fbe4. ± Comparison against base commit 2dee855.

♻️ This comment has been updated with latest results.

@analiliagutierrez
analiliagutierrez force-pushed the EDFI-2786-generalize-account-management-link branch from d277b7a to e66a14f Compare July 28, 2026 17:48
@analiliagutierrez
analiliagutierrez force-pushed the EDFI-2786-generalize-account-management-link branch 2 times, most recently from ba2a2b6 to e33587f Compare August 10, 2026 23:51
Drop the hardcoded Keycloak account URL fallback in methods.ts so
IDP_ACCOUNT_URL is undefined when VITE_IDP_ACCOUNT_URL is unset. Hide the
Account Management link in ViewAccount when no URL is configured, avoiding a
broken link for non-Keycloak IdPs (e.g. Entra). Clean the env template to
document the variable as optional and IdP-specific.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@analiliagutierrez
analiliagutierrez force-pushed the EDFI-2786-generalize-account-management-link branch from e33587f to 919fbe4 Compare August 11, 2026 15:30
@jagudelo-gap
jagudelo-gap merged commit cb15c0e into main Aug 11, 2026
31 checks passed
@jagudelo-gap
jagudelo-gap deleted the EDFI-2786-generalize-account-management-link branch August 11, 2026 16:33
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.

3 participants