Skip to content

[Fans] Recognize fans across a customer’s campaigns and connected apps #2111

Open

Description

@sidneyswift

Parent epic: #2093

Priority

P0 — First shared Sites and external Widgets release.

User journey

A fan signs in on one customer application and returns through another authorized website with the same verified identity. Later audience and points features reuse that identity without requiring a mailing-list subscription.

Acceptance criteria

  • Give each fan a stable identity within the customer boundary; email and Spotify are optional verified sign-in methods, not the primary identifier or a requirement for marketing consent.
  • Allow explicitly authorized applications to recognize the same customer-scoped fan across campaigns. Programs are separate memberships added by [Fans] Configure customer-owned points programs and earning rules #2112, not separate primary fan identities. Do not expose identities across unrelated customers or grant access to another program's balances/history without authorization.
  • Support account recovery and identity linking only with proof of control. Never merge accounts solely because an unverified email string matches; preserve audit history and existing balances.
  • Keep provider disconnect, rewards membership, and marketing unsubscribe as distinct actions, with documented deletion/recovery behavior and scoped access. Coordinate with [Fans] Build a workspace fan audience across campaigns #2098 rather than duplicating the fan audience model.
  • Expose identity and fan-session operations through the shared API and appropriate MCP administration tools; client sessions can access only their own identity. Program membership is added in [Fans] Configure customer-owned points programs and earning rules #2112.

Blocking dependencies

These are completion prerequisites, mirrored in GitHub’s blocked-by links. Design and contract work may start earlier. Other coordination references are not blockers.

Validation

Test the same fan across two authorized domains, unrelated customers, changed email, provider disconnect, expired sessions, conflicting links, and attempted account takeover.

Architecture and ownership

Customer-owned program; Recoup-owned infrastructure. Shared API business logic supports MCP, Recoup Sites, and independent apps. Database changes go through the database repository PR workflow. Use existing durable workflow patterns for notifications and reconciliation. Customer API credits and fan reward points are distinct systems. External games own their scoring and score leaderboards.

Approved category and ownership

Fans owns stable identity, sign-in sessions, membership, and fan-authorized provider connections. Widgets supplies the visible sign-in experience. Customers can build their own interface against the same Fans API. Identity remains distinct from discovered social profiles and mailing-list consent.

Parent epic #2093 defines Sites, Fans, and Widgets. Use those names in public documentation and MCP descriptions. Preserve existing functional requirements, dependencies, and authorization/billing boundaries.

Delivery boundary

Deliver stable customer-scoped identity, verification/linking, and session contracts first. #2107 plugs Spotify authorization into those contracts; #2098 adds audience management; #2112 adds program membership and #2113 adds balances. Those consumers do not block this foundation. Validate recovery with verified identity fixtures now and complete provider integration in #2107.

Council-approved identity continuity

Host sign-in and existing-account linking contracts — P0

  • Support both journeys: establish a host website account through Recoup sign-in, and connect Spotify to an already-signed-in host account without replacing that account or losing its purchases/progress.
  • Define a verifiable, application- and environment-bound sign-in result with expiry, intended recipient and replay protection. Connection-status events are not login proof. [Widgets] Extract Spotify Sign-in and Webplayer backed by shared Fans services #2107 implements provider completion against this contract.
  • Let an authenticated customer backend bind its existing user ID to a verified Recoup fan after proving the current host session. Scope mappings to customer/application/environment. Never trust an arbitrary browser-supplied user ID, matching email alone, or a public widget ID.
  • Define conflicts before schema implementation: one Spotify identity presented by two host users, an existing mapping to a different fan, unlink/relink and recovery. Reject or require an explicit verified recovery flow; never silently merge accounts or transfer purchases/points.
  • Document host logout, Recoup-session logout, Spotify disconnect, marketing unsubscribe and account deletion separately. Spotify disconnect alone preserves the host account, progress, purchases and program membership/points.
  • Specify the supported static-site path without frontend secrets. A static embed can connect/play; do not promise that a client-only status flag securely protects customer accounts or private content. Document any required trusted hosted/backend service.

Validation: new host account, existing Google/email account, forged host ID, wrong application/environment, replayed/expired proof, conflicting links, disconnect/reconnect, and unrelated-customer isolation. #2110 verifies both deployed host journeys.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:P0Required for the first shared Sites and external Widgets release

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions