Skip to content

fix: correct staging OAuth client ID#6

Merged
alukach merged 6 commits into
mainfrom
fix/staging-oauth-config
Jun 26, 2026
Merged

fix: correct staging OAuth client ID#6
alukach merged 6 commits into
mainfrom
fix/staging-oauth-config

Conversation

@alukach

@alukach alukach commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

What

The committed staging CLIENT_ID (c445cc61…) does not exist in the staging Ory project — auth.staging.source.coop returns invalid_client for it, so --features staging builds can't authenticate. The real source-coop-cli client is a79c9537-be78-454a-9ea1-b96a1be811cc, verified directly against the live Ory project (it's the client named source-coop-cli, and the authorize endpoint accepts it).

Also adds a .env.staging helper so a normal (prod) build can be pointed at staging without a rebuild, via the existing SOURCE_* env vars.

Changes

  • src/main.rs — staging CLIENT_ID c445cc61…a79c9537…. Prod defaults untouched.
  • .env.stagingsource it to override issuer/client/proxy (public values only).
  • .gitignore — ignore .env/.env.local, keep .env.staging tracked.

Scope / notes

  • Split out of the larger OIDC-rework branch (feat/oidc-based-auth, feat: discovery-driven OIDC auth with device code & refresh token flows #5) so this verified production-config fix can land independently of that still-in-progress work.
  • .env.staging's SOURCE_PROXY_URL matches main's current staging default (https://staging.data.source.coop). The feat branch moves the proxy to a /.sts path; that change is intentionally left there, not in this PR, since I couldn't independently verify the endpoint.

Verify

  • cargo build --features staging — clean.

🤖 Generated with Claude Code

alukach and others added 5 commits June 24, 2026 19:36
The committed staging CLIENT_ID (c445cc61…) does not exist in the staging Ory
project — auth.staging.source.coop returns invalid_client for it. The real
source-coop-cli client is a79c9537-be78-454a-9ea1-b96a1be811cc (verified against
the live Ory project). Prod defaults are unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Source it (`source .env.staging`) to override issuer/client/proxy via the
existing SOURCE_* env vars — no rebuild needed. Values are public (OIDC public
client + public URLs). Ignore other .env files to avoid committing secrets.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The committed prod CLIENT_ID (d037d00b…) does not exist in the prod Ory project
either — auth.source.coop returns invalid_client. Prod had no source-coop-cli
client at all (only "source.coop frontend"), so a public CLI client was created
mirroring staging (auth-method none, redirect http://127.0.0.1/callback, grants
authorization_code + refresh_token). New id: 197e20e7-d52d-4d1d-9e54-4b73a342034b
(verified: auth.source.coop now routes it to the login UI).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Staging PROXY_URL host staging.data.source.coop -> data.staging.source.coop
  (matches the *.staging.source.coop pattern, like auth.staging.source.coop; the
  old host did not resolve). .env.staging synced to match.
- ROLE_ARN default sentinel "default" -> "_default" (staging + prod).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
assume_role used proxy_url's path verbatim, so a base proxy_url (the default)
sent AssumeRoleWithWebIdentity to the proxy root. Set the path to /.sts in a
shared sts_url() helper so auth requests always target /.sts regardless of the
configured proxy_url (base, trailing slash, or already-suffixed). Covered by a
unit test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alukach alukach merged commit f2341b6 into main Jun 26, 2026
9 checks passed
@alukach alukach deleted the fix/staging-oauth-config branch June 26, 2026 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant