Skip to content

feat(sdk/js): add OIDC autth support for TypeScript SDK#1219

Draft
arpad-csepi wants to merge 1 commit intomainfrom
feat/typescript-sdk-oidc-support
Draft

feat(sdk/js): add OIDC autth support for TypeScript SDK#1219
arpad-csepi wants to merge 1 commit intomainfrom
feat/typescript-sdk-oidc-support

Conversation

@arpad-csepi
Copy link
Copy Markdown
Member

@arpad-csepi arpad-csepi commented Mar 31, 2026

This PR adds OAuth 2.0 / OIDC authentication to the Directory Python SDK so gRPC calls can send a Bearer access token when auth_mode is oauth_pkce.

Supports:

  • interactive browser login (Authorization Code + PKCE) with a loopback callback
  • non-interactive access via a pre-provisioned token
  • machine / CI flows via the client credentials grant

Configuration is extended with OIDC/OAuth fields: issuer, client id/secret, redirect URI, callback port, auth timeout, scopes, optional static access token, and machine client settings (id, secret, secret file, scopes, optional token endpoint) with the corresponding DIRECTORY_CLIENT_* environment variable wiring for these options.

Signed-off-by: Árpád Csepi <csepi.arpad@outlook.com>
@github-actions
Copy link
Copy Markdown
Contributor

The latest Buf updates on your PR. Results from workflow Buf CI / verify-proto (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped⏩ skipped✅ passedMar 31, 2026, 6:01 PM

@github-actions github-actions bot added the size/M Denotes a PR that changes 200-999 lines label Mar 31, 2026
}

export function normalizeIssuer(issuer: string): string {
const u = issuer.trim().replace(/\/+$/, '');

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This
regular expression
that depends on
library input
may run slow on strings with many repetitions of '/'.
This
regular expression
that depends on
library input
may run slow on strings with many repetitions of '/'.
@arpad-csepi arpad-csepi changed the title feat(sdk): wip - add oauth authentication support feat(sdk): Add OIDC autth support for TypeScript SDK Mar 31, 2026
@arpad-csepi arpad-csepi changed the title feat(sdk): Add OIDC autth support for TypeScript SDK feat(sdk/js): Add OIDC autth support for TypeScript SDK Mar 31, 2026
@arpad-csepi arpad-csepi changed the title feat(sdk/js): Add OIDC autth support for TypeScript SDK feat(sdk/js): add OIDC autth support for TypeScript SDK Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 200-999 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants