Skip to content

Add GET /oauth/providers endpoint for OAuth provider availability#18

Merged
slhmy merged 3 commits intomainfrom
copilot/add-oauth-provider-availability-endpoint
Apr 12, 2026
Merged

Add GET /oauth/providers endpoint for OAuth provider availability#18
slhmy merged 3 commits intomainfrom
copilot/add-oauth-provider-availability-endpoint

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 12, 2026

BFF/frontend has no way to know whether OAuth providers are configured before rendering login options, leading to broken "Login with GitHub" buttons when OAuth is misconfigured.

Changes

  • Proto: Added ListOAuthProviders RPC mapped to GET /oauth/providers with OAuthProviderStatus message type (name, enabled, optional reason)
  • Service: Implemented config validation — checks client_id and client_secret presence, returns machine-readable disable reasons
  • Generated code: Regenerated gRPC server/client, gateway handlers, and OpenAPI spec via protoc
  • Tests: Four unit tests covering enabled, missing_client_id, missing_client_secret, and completeness of provider list

Response shape

{"providers": [{"name": "github", "enabled": true}]}
{"providers": [{"name": "github", "enabled": false, "reason": "missing_client_id"}]}

Providers are sorted alphabetically for deterministic ordering.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • buf.build
    • Triggering command: /home/REDACTED/go/bin/buf buf generate 4Kwm452TDXZMOUiLiUG4/4Kwm452TDXZMOUiLiUG4 l/linux_amd64/compile go1.25.9 -c=4 -nolocalimports -importcfg /tmp/go-build1844953333/b748/importcfg (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI linked an issue Apr 12, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits April 12, 2026 13:08
- Add ListOAuthProviders RPC to proto service definition
- Add ListOAuthProvidersRequest, OAuthProviderStatus, ListOAuthProvidersResponse message types
- Regenerate Go gRPC, gateway, and OpenAPI code
- Implement ListOAuthProviders on Service struct with config checks
- Add unit tests for enabled, missing_client_id, missing_client_secret cases

Agent-Logs-Url: https://github.com/poly-workshop/identra/sessions/1900f5cd-d4e7-4b85-b36d-afae6190e73c

Co-authored-by: slhmy <31381093+slhmy@users.noreply.github.com>
Copilot AI changed the title [WIP] Add endpoint for OAuth provider availability Add GET /oauth/providers endpoint for OAuth provider availability Apr 12, 2026
Copilot AI requested a review from slhmy April 12, 2026 13:10
@slhmy slhmy marked this pull request as ready for review April 12, 2026 14:12
@slhmy slhmy merged commit 87a7795 into main Apr 12, 2026
1 check passed
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.

Expose OAuth provider availability endpoint

2 participants