Skip to content

Auth: support multiple platform environments (per-host credential profiles) #329

@jacekradko

Description

@jacekradko

While dogfooding the CLI (1.5.0, agent-driven) against a second Clerk platform environment, we hit a wall on auth: CLERK_PLATFORM_API_URL cleanly redirects requests, but the credential store only holds one OAuth token and clerk auth login has no notion of which host a token belongs to. Logging into the alternate environment would clobber the production login, so the only safe path is minting a platform API key for the second environment and threading CLERK_PLATFORM_API_KEY through every call.

That workaround is fine for CI but makes non-production work second-class for interactive use. A per-host credential store (key tokens by platform API URL) or an explicit --profile on auth login/api/config would make switching environments first-class. Bonus: clerk doctor could report which environment the stored token belongs to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions