-
Notifications
You must be signed in to change notification settings - Fork 4
[HYPER-328] preview routes for iterating on branding CSS #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
fe3ec90
feat(auth-service): preview routes for iterating on client branding CSS
aspiers 8298d25
docs(env): add AUTH_PREVIEW_ROUTES to top-level .env.example
aspiers c93c891
docs: put preview-routes guide in the client tutorial, not operator c…
aspiers 9cf50f7
feat(pds-core): preview route for iterating on consent-page CSS
aspiers 294842d
fix(pds-core): drive preview consent SPA to the consent view
aspiers 516db31
fix(preview): escape hydration <script> against XSS + cache-bypass
aspiers f1cab6e
feat(preview): persisted client_id input + live cache-status panel
aspiers f569411
fix(preview): reword /preview copy around the URL input
aspiers 7b68e7b
feat(preview): validate metadata URL + richer cache-entry UI
aspiers 0510e0c
feat(preview): cross-list all routes on both /preview pages
aspiers ec85696
fix(demo): drop "auth-service" from preview-link copy
aspiers 22adea0
fix(preview): carry client_id across cross-origin preview links
aspiers 2efff88
style(preview): widen /preview index pages 640px → 768px
aspiers 5b7e387
style(preview): move query-string snippet onto its own line
aspiers 87d3400
feat(preview): <code> formatting for field names and URLs in checks
aspiers 5804997
feat(preview): add choose-handle preview for picker-only mode
aspiers 836ab69
feat(preview): sync address bar with client_id input
aspiers b4d6b80
docs(preview): flag cache-status client_id leak and recommend off in …
aspiers 2e5c538
feat(preview): link sibling-service heading to its /preview index
aspiers 9983f47
feat(preview): validate tos_uri and policy_uri on client metadata
aspiers 0ddbaa0
feat(preview): link 'the JSON body' to the fetched metadata URL
aspiers b603ed4
refactor(preview): share index-page shell across both services
aspiers 685bc7f
refactor(preview): extract queryString / sendHtml / getBranding helpers
aspiers ca3d60f
test(preview): cover preview-ui; silence pino under NODE_ENV=test
aspiers c02b24c
fix(preview): address CodeRabbit feedback
aspiers 7141fe4
fix(preview): carry client_id across the sibling-service heading link
aspiers 10230b4
refactor(preview-validation): split the 250-line orchestrator into pe…
aspiers 031f8be
refactor(preview-validation): wrap tos_uri / policy_uri in named chec…
aspiers bb1d557
chore: address SonarCloud minor findings + document pre-push checks
aspiers ede6929
refactor(pds-core): extract installPreviewRoutes from main()
aspiers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| 'ePDS': minor | ||
| --- | ||
|
|
||
| Add preview routes on auth-service and pds-core for iterating on client branding CSS. | ||
|
|
||
| **Affects:** Client app developers, Operators | ||
|
|
||
| **Client app developers:** Two new sets of preview routes render the ePDS sign-in pages against fixture data, so you can iterate on your `branding.css` without walking through a real OAuth flow each time. The auth-service exposes `/preview`, `/preview/login`, `/preview/login-otp`, `/preview/choose-handle`, `/preview/recovery`, and `/preview/recovery-otp`. pds-core exposes `/preview` and `/preview/consent` — the consent route renders the same `@atproto/oauth-provider-ui` SPA as the real `/oauth/authorize` page, hydrated with fixture data. Pass `?client_id=<URL-of-your-client-metadata.json>` on any of them to inject that client's `branding.css` into the page, subject to the same `PDS_OAUTH_TRUSTED_CLIENTS` check as a real OAuth flow. Without `client_id` the page renders unbranded (baseline). Iterating becomes: edit `branding.css`, refresh the preview URL — no OTP emails, no walking through the full flow. Visit `/preview` on either service for an index. | ||
|
|
||
| **Operators:** Two new env vars gate the preview routes, one per service: `AUTH_PREVIEW_ROUTES=1` on auth-service, `PDS_PREVIEW_ROUTES=1` on pds-core. Both are independent and safe to enable on preview deployments (Railway PR previews, `pr-base`, dev) and on local development instances. The preview routes have no effect on real auth flows — they short-circuit real state — so they can technically run in production too, but they are a developer-only surface and are best left off outside of preview/dev envs. See `packages/auth-service/.env.example` and `packages/pds-core/.env.example` for the full notes. |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.