Skip to content

Decouple: hardcoded registration_source string #22

Description

@chubes4

Coupling

src/auth/context.tsx:179 and src/auth/context.tsx:230 hardcode registration_source: 'extrachill-app' in the registration POST payload.

registration_source: 'extrachill-app',

This identifies which client created the account on the server side. It's useful telemetry but the literal string is consumer-specific.

Target shape

Take it from the brand / api config:

// extrachill.config.ts (consumer side)
export const config: WPNativeConfig = {
  api: {
    baseUrl: 'https://extrachill.com/wp-json',
    clientId: 'extrachill-app',  // sent as registration_source on /register
    clientHeader: 'ExtraChill-Client',
  },
  ...
};

The shell's auth provider reads config.api.clientId and includes it on register / google / any other endpoint that wants client identity.

Acceptance

  • No hardcoded 'extrachill-app' string in shell code
  • clientId flows from consumer config
  • Both register paths (email/password + Google) send it consistently

Related

Part of the wp-native extraction effort. See chubes4/wp-native ROADMAP M5/M7.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wp-native-extractionCoupling to extract for wp-native framework

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions