Skip to content

refactor(api): evaluate necessity of email query param in GET /experiences #431

Description

@masch

Context

In apps/api/src/routes/experiences.ts, the GET /experiences endpoint accepts an optional ?email= query parameter:

  • It uses email alongside deviceId to check permissions across purchases and free_downloads.

Current Usage Analysis

  • In the mobile app, 100% of fetchExperiences() calls rely strictly on the X-Device-Id header injected by ApiClient.
  • Access grants from payments and free download leads are linked to deviceId during the initial claim/purchase flow, making deviceId sufficient for playback and download authorization on the client.

Questions for Evaluation

  1. Redundancy: Is the ?email= query parameter on GET /experiences redundant with the device-centric access architecture?
  2. Multi-device vs Simplicity: Should we retain ?email= as an extensibility hook for future user accounts/cross-device sync, or simplify the endpoint queries to only rely on X-Device-Id to reduce query branching and complexity?
  3. Privacy & Consistency: If email is passed as a query param in a GET request, consider potential log leakage vs header/token-based auth if retained.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions