feat(auth): add canonical accountUrl helper - #22
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What
Adds
accountUrl(accountBaseUrl)to@omnidotdev/providers/react, the canonical "manage account" URL helper. It trims trailing slashes and returns the account base URL; the caller passes a full base URL.Why
Apps today inline
${AUTH_BASE_URL}/dashboardor aCONSOLE_URLfor "manage account", inconsistently (herald-app alone uses both). This is step one of consolidating all account management onto a single host (futureaccount.omni.dev). With one canonical helper plus a per-appVITE_ACCOUNT_URLenv, the account host can move with a one-line env change per app instead of edits across the fleet.accountUrlsits beside the existinggatekeeperDashboardUrl, whose doc now steers account links toaccountUrl(org-management deep links keep usinggatekeeperDashboardUrlfor now).Design
gatekeeperDashboardUrl, which appends/dashboard.https://identity.omni.dev/dashboard(passes through unchanged) and flips tohttps://account.omni.devlater.Tests
src/react/ManageTeamLink.test.ts: base URL unchanged, trailing-slash trim, interim identity-dashboard value preserved.build/is regenerated by the pre-commit hook; the smallbuild/index.js/build/flagsdiffs are the hook syncing a previously-stale committed build, not behavioral changes.Rollout
After merge, repin
@omnidotdev/providersto the merged SHA in apps as they adoptaccountUrl(starting with herald-app), with no per-app change beyond the link repoint plusVITE_ACCOUNT_URL.