Skip to content

Derive default auth audience from login environment - #10

Merged
emsearcy merged 1 commit into
mainfrom
jme/fix-dev-url
Sep 16, 2026
Merged

emsearcy merged 1 commit into
mainfrom
jme/fix-dev-url

Conversation

@jordane

@jordane jordane commented Sep 15, 2026

Copy link
Copy Markdown
Member

Summary

  • keep the production API audience at https://lfx-api.v2.cluster.lfx.dev/
  • derive the default login audience from --env when --audience is omitted
  • use the matching deployed API endpoints for development and staging
  • add tests covering per-environment default audience resolution

Default audiences

  • prod: https://lfx-api.v2.cluster.lfx.dev/
  • staging: https://lfx-api.staging.v2.cluster.linuxfound.info/
  • development: https://lfx-api.dev.v2.cluster.linuxfound.info/

Testing

  • make check
  • go test ./...

Copilot AI balanced review requested due to automatic review settings September 15, 2026 15:49
@jordane
jordane requested review from a team and emsearcy as code owners September 15, 2026 15:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Derives the default Auth0 audience from the selected login environment while retaining explicit overrides.

Changes:

  • Adds production, staging, and development audience mappings.
  • Resolves omitted --audience values from --env.
  • Tests valid and invalid environment resolution.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
internal/commands/environment.go Defines and resolves environment-specific audiences.
internal/commands/auth.go Applies the selected environment’s default audience during login.
internal/commands/auth_test.go Covers audience mappings and invalid environments.

Note

Copilot is running an experiment and ran this review at Balanced.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Signed-off-by: Jordan Evans <jevans@linuxfoundation.org>
@emsearcy
emsearcy merged commit 94140a3 into main Sep 16, 2026
8 checks passed
@emsearcy
emsearcy deleted the jme/fix-dev-url branch September 16, 2026 00:34
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.

3 participants