Repository navigation
[Feature] Point marketing Decap at the shared OAuth service; keep Contact on marketing-edge #283
Description
Goal
Point Platform Kit marketing Decap /admin at the shared org service cms-oauth-kit (https://auth.singletonsd.com) instead of ssd-pocpk-decap-oauth-dev-ae.
Keep the existing marketing-edge Function App for anonymous brochure HTTP (POST /contact, /health). Do not move Contact into the shared OAuth service.
Locked decisions (from singleton-sd/marketing#6)
- Shared repo:
singleton-sd/cms-oauth-kit base_url:https://auth.singletonsd.com- Shared
ORIGINSalready covers this site (*.singletonsd.comincludesplattform-kit.poc.singletonsd.com). Do not maintain a second origin list here.
Why
apps/marketing-oauth currently mixes two unrelated jobs on one host:
- Decap GitHub OAuth (
/auth,/callback) — needed by every Decap marketing site. - Marketing Contact (
/contact) — Platform Kit–specific, uses@poc-plattform-kit/emailand PK Key Vault / App Config.
InkAds marketing already sets base_url to this PoC Function. After the shared service exists, PK should consume it like any other site and stop being an OAuth provider.
Scope
In scope:
- Update
apps/marketing/public/admin/config.yml:base_url: https://auth.singletonsd.com- Keep
auth_endpoint: authandbackend.repo: singleton-sd/poc-plattform-kit.
- Remove OAuth-only code and wiring from this repo without deleting the Contact Function:
- Delete
src/functions/auth.ts,src/functions/callback.ts,github-oauth.ts(+ specs) fromapps/marketing-oauthonce unused. - Keep
/contact,/health, email vendor zip deploy, rate limit. - Strip OAuth app settings from
infra/decap-oauth.bicep(OAUTH_*,REDIRECT_URL,SCOPES, DecapORIGINSif only used by OAuth). Rename the Bicep/workflow later if useful; not required in this PR if it risks a larger infra diff — a follow-up rename is OK if called out in the PR. - Stop requiring GitHub Variable
DECAP_OAUTH_CLIENT_IDand KV secretgithub-decap-oauth-client-secretfor this Function. Do not delete those names from PK KV until no PK resource reads them.
- Delete
- Update docs that currently say this repo hosts the shared Decap OAuth proxy:
docs/marketing-astro-decap.mddocs/marketing-edge.mdAGENTS.mdarchitecture bullet for marketing-edge (OAuth is no longer a reason this Function exists; Contact is).SETUP.md/infra/README.mdOAuth sections as needed.
.github/workflows/deploy-decap-oauth.ymlstays as marketing-edge / Contact deploy (path filters should no longer be described as “Decap OAuth”). Adjust path filters if OAuth-only files are gone.- Verify
/adminGitHub login onhttps://plattform-kit.poc.singletonsd.com/admin(custom domain, not the raw SWA default host). - Verify Contact form still posts to
{PUBLIC_MARKETING_API_BASE_URL}/contacton the PK Function (ssd-pocpk-decap-oauth-dev-aeunless a later issue renames it).
Out of scope:
- Creating
cms-oauth-kitor deploying torg-ssd-global. - Renaming
ssd-pocpk-decap-oauth-dev-ae/apps/marketing-oauth(nice follow-up; do not block cutover on a rename). - Moving Contact to Nest or to PostKit.
Acceptance criteria
- Decap
/adminonhttps://plattform-kit.poc.singletonsd.com/admincompletes GitHub login viahttps://auth.singletonsd.com(popup handshake succeeds). -
config.ymlbase_urlishttps://auth.singletonsd.com(nothttps://ssd-pocpk-decap-oauth-dev-ae.azurewebsites.net). -
POST /contactonssd-pocpk-decap-oauth-dev-aestill works;PUBLIC_MARKETING_API_BASE_URLstill targets this PK Function, notauth.singletonsd.com. - This repo no longer deploys
/author/callback. - Docs no longer describe PK as the org Decap OAuth provider; they link
singleton-sd/cms-oauth-kitAGENTS.md. -
pnpm --filter @poc-plattform-kit/marketing-oauth testis green (Contact + remaining unit tests). - KV
github-decap-oauth-client-secretis not required for PK Function deploy.
Constraints
- Marketing public HTTP stays on the PK Function App — see
docs/marketing-edge.md. Do not attach Contact to Nest. - Do not point
PUBLIC_MARKETING_API_BASE_URLathttps://auth.singletonsd.com. - Do not open
/adminfor OAuth testing on*.azurestaticapps.netdefault hosts — those are not in sharedORIGINS. Use*.singletonsd.com. - Secrets stay in Key Vault; never GitHub Secrets.
- CAF / cheapest SKUs unchanged for the remaining PK Function (still on
pocpk-planB1).
Dependencies
Depends on: singleton-sd/marketing#6
Do not start until https://auth.singletonsd.com/health returns 200.
Blocks: InkAds can cut over in parallel with this issue (both only need the shared service). No hard block between PK and InkAds.
Technical references
- Decap config:
apps/marketing/public/admin/config.yml - Function:
apps/marketing-oauth/(auth.ts,callback.ts,contact.ts) - Bicep:
infra/decap-oauth.bicep - Deploy:
.github/workflows/deploy-decap-oauth.yml,scripts/deploy-decap-oauth.ps1 - Docs:
docs/marketing-astro-decap.md,docs/marketing-edge.md - Shared service tracker: [Feature] Bootstrap singleton-sd/cms-oauth-kit in rg-ssd-global (auth.singletonsd.com) marketing#6
- Target RG for the shared Function (not this Function): https://portal.azure.com/#@singletonsd.com.au/resource/subscriptions/01c0bb8b-3770-4765-979a-cb13ae7e3dd2/resourceGroups/rg-ssd-global/overview
Agent-ready checklist
- Goal/problem statement is clear
- Scope is sufficient to start work without further business clarification
- Acceptance criteria are explicit
- Relevant constraints are stated
- No unresolved blocking dependency (
Depends on) — blocked on [Feature] Bootstrap singleton-sd/cms-oauth-kit in rg-ssd-global (auth.singletonsd.com) marketing#6
Activity
patoperpetua commentedon Aug 22, 2026
Sibling cutovers (parallel after the shared service is live): singleton-sd/marketing#7, singleton-sd/poc-inkads-marketing#30. Bootstrap: singleton-sd/marketing#6.
patoperpetua commentedon Aug 22, 2026
GitHub OAuth App (callback already
https://auth.singletonsd.com/callback):https://github.com/settings/applications/3783537
Name: Singleton SD CMS OAuth
feat: #283 Point Decap at cms-oauth-kit
patoperpetua commentedon Aug 23, 2026
Architecture decision updated: Platform Kit should retain no local marketing OAuth/email Function. PR #286 now deletes
apps/marketing-oauth, its Bicep/workflow/deploy script, and points Contact at shared PostKit. This supersedes the issue's earlier “keep Contact on marketing-edge” constraint. PostKit's API is merged but not yet provisioned because its deployment job skipped without repository OIDC variables.