Add StreamPixels managed auth seams
This commit is contained in:
parent
5ef94bb725
commit
f22db66d64
15 changed files with 589 additions and 26 deletions
|
|
@ -31,6 +31,7 @@ In the service-first Heimdall version, the most likely reusable slice is:
|
|||
|
||||
- provider OAuth authority
|
||||
- identity-linking authority
|
||||
- managed Twitch/YouTube credential custody for creator connections
|
||||
- entitlement refresh
|
||||
- shared claim semantics
|
||||
|
||||
|
|
|
|||
|
|
@ -36,6 +36,13 @@ What exists right now is:
|
|||
- a local verifier helper that app backends can use against Heimdall JWKS
|
||||
- Repixelizer has consumed the direct backend callback flow in its hosted web
|
||||
layer and verifies Heimdall Ed25519 access tokens locally
|
||||
- generic Twitch and YouTube OAuth callback runtimes for StreamPixels identity
|
||||
and managed creator connections
|
||||
- an app-authenticated managed-credential resolve endpoint so StreamPixels can
|
||||
call provider APIs without storing refresh tokens locally
|
||||
- StreamPixels now starts viewer and creator Twitch/YouTube OAuth through
|
||||
Heimdall, redeems one-time completion codes server-side, and keeps local
|
||||
profile/creator connector binding state in StreamPixels
|
||||
- Heimdall is deployed on Yggdrasil at `https://heimdall.gamecult.org` with
|
||||
nginx/TLS, Postgres storage, stable file-backed signing, configured token
|
||||
custody, and public health/discovery/JWKS checks passing
|
||||
|
|
@ -124,12 +131,29 @@ Current Patreon policy:
|
|||
|
||||
Goals:
|
||||
|
||||
- move provider/linking authority toward Heimdall
|
||||
- keep viewer profiles, creator memberships, connector creds, and audience data
|
||||
- move provider/linking authority to Heimdall
|
||||
- keep viewer profiles, creator memberships, connector bindings, diagnostics,
|
||||
runtime behavior, and audience data
|
||||
in StreamPixels
|
||||
- keep creator/operator route authorization local to StreamPixels after claim
|
||||
verification
|
||||
|
||||
Landed:
|
||||
|
||||
- Heimdall handles Twitch/YouTube OAuth exchange and identity resolution
|
||||
- Heimdall stores managed provider tokens and exposes current access-token
|
||||
resolution to app backends through an app shared secret
|
||||
- StreamPixels delegates viewer claim/link and creator connector OAuth starts
|
||||
to Heimdall
|
||||
- StreamPixels redeems completion codes through its service, then owns local
|
||||
viewer profile linking or creator connector binding
|
||||
|
||||
Still to verify:
|
||||
|
||||
- real browser StreamPixels viewer claim/link
|
||||
- real creator connector attach for Twitch and YouTube
|
||||
- runtime polling/subscription behavior using Heimdall-resolved credentials
|
||||
|
||||
### 5. Capture the Yggdrasil deployment shape early
|
||||
|
||||
Goals:
|
||||
|
|
|
|||
|
|
@ -161,8 +161,10 @@ Failure mode right now:
|
|||
Launch note:
|
||||
|
||||
- Discord and Patreon are the implemented provider runtimes for Repixelizer
|
||||
- GitHub, Twitch, and YouTube are catalogued for start URLs, but their
|
||||
callback exchange/identity/entitlement runtimes are not implemented yet
|
||||
- Twitch and YouTube now have generic OAuth exchange and identity runtimes for
|
||||
StreamPixels viewer auth and managed creator connections
|
||||
- GitHub is still catalogued for start URLs, but its callback runtime is not
|
||||
implemented yet
|
||||
- Repixelizer launch can configure Discord and Patreon on its provider buttons
|
||||
|
||||
### `GET /v1/oauth/{provider}/callback`
|
||||
|
|
@ -187,8 +189,8 @@ Current status:
|
|||
- if opener handoff is used and fails, the completion page still offers a
|
||||
fallback return link carrying only the one-time completion code, not the
|
||||
access token
|
||||
- other configured providers still return "not implemented" at the runtime
|
||||
adapter layer until their callback paths are added
|
||||
- GitHub still returns "not implemented" at the runtime adapter layer until its
|
||||
callback path is added
|
||||
|
||||
Success response for backend-callback handoff now includes:
|
||||
|
||||
|
|
@ -246,6 +248,7 @@ Current payload shape on success:
|
|||
"appSlug": "repixelizer",
|
||||
"mode": "sign_in",
|
||||
"returnTo": "https://repixelizer.gamecult.org/app/",
|
||||
"connection": null,
|
||||
"account": {
|
||||
"id": "acct_repixelizer_001",
|
||||
"displayName": "Meta"
|
||||
|
|
@ -276,6 +279,7 @@ Current payload shape on failure:
|
|||
"appSlug": "repixelizer",
|
||||
"mode": "sign_in",
|
||||
"returnTo": "https://repixelizer.gamecult.org/app/",
|
||||
"connection": null,
|
||||
"error": "oauth_callback_failed",
|
||||
"errorDescription": "..."
|
||||
}
|
||||
|
|
@ -348,6 +352,50 @@ Important behavior:
|
|||
- app backends should redeem them server-side
|
||||
- the browser should not keep the final access token in callback URL fragments
|
||||
|
||||
### `POST /v1/apps/{appSlug}/managed-credentials/resolve`
|
||||
|
||||
Purpose:
|
||||
|
||||
- let an app backend retrieve the current Heimdall-custodied access token for
|
||||
a managed provider connection
|
||||
- keep refresh-token custody inside Heimdall instead of app persistence
|
||||
|
||||
Authentication:
|
||||
|
||||
- requires `x-heimdall-app-secret`
|
||||
- the configured secret comes from `GC_ACCESS_APP_{APP_SLUG}_SHARED_SECRET` or
|
||||
the generic `GC_ACCESS_APP_SHARED_SECRET`
|
||||
|
||||
Request body:
|
||||
|
||||
```json
|
||||
{
|
||||
"accountId": "acct_streampixels_001",
|
||||
"provider": "youtube"
|
||||
}
|
||||
```
|
||||
|
||||
Response:
|
||||
|
||||
```json
|
||||
{
|
||||
"accountId": "acct_streampixels_001",
|
||||
"provider": "youtube",
|
||||
"providerUserId": "channel-123",
|
||||
"accessToken": "<provider-access-token>",
|
||||
"tokenExpiresAt": "2026-04-26T13:00:00.000Z",
|
||||
"scopes": ["openid", "profile", "email"]
|
||||
}
|
||||
```
|
||||
|
||||
Important behavior:
|
||||
|
||||
- this endpoint only works for providers listed in the app profile's
|
||||
`managedConnectionProviders`
|
||||
- it returns access tokens only; refresh tokens remain in Heimdall custody
|
||||
- app-local binding, diagnostics, subscription setup, and runtime behavior stay
|
||||
app-owned
|
||||
|
||||
### Reference local verifier seam
|
||||
|
||||
Purpose:
|
||||
|
|
@ -465,7 +513,7 @@ The following are not landed yet:
|
|||
|
||||
- refresh/revocation flows
|
||||
- admin/grant management surfaces
|
||||
- provider callback runtimes beyond Discord
|
||||
- GitHub callback runtime
|
||||
|
||||
## Next implementation move
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue