Skip to content

feat: support implicit OAuth in VS Code remote environments#285

Merged
clavery merged 3 commits intomainfrom
feature/implicit-auth-vscode-remote
Mar 29, 2026
Merged

feat: support implicit OAuth in VS Code remote environments#285
clavery merged 3 commits intomainfrom
feature/implicit-auth-vscode-remote

Conversation

@clavery
Copy link
Copy Markdown
Collaborator

@clavery clavery commented Mar 24, 2026

Summary

  • Add openBrowser and redirectUri options to ImplicitOAuthConfig, AuthCredentials, and CreateOAuthOptions in the SDK so callers can customize the implicit auth flow
  • VS Code extension now uses vscode.env.openExternal (opens browser on the client machine) and vscode.env.asExternalUri (resolves localhost:8080 to the Codespaces forwarded port URL like https://<name>-8080.app.github.dev)
  • Implicit OAuth now works in Codespaces and other VS Code remote environments without manual SFCC_REDIRECT_URI configuration

Test plan

  • Verify implicit OAuth flow works in local VS Code (no behavior change)
  • Verify implicit OAuth flow works in GitHub Codespaces — browser should open on client and redirect URI should resolve to *.app.github.dev
  • Verify SFCC_REDIRECT_URI env var still takes precedence when explicitly set
  • Verify client-credentials OAuth (clientId + clientSecret) is unaffected

clavery added 2 commits March 24, 2026 12:11
Remove the "Developer Preview" note and disclaimer from the CLI README,
the preview banner from the docs site theme, and all associated CSS.
Add openBrowser and redirectUri options to ImplicitOAuthConfig,
AuthCredentials, and CreateOAuthOptions so callers can customize the
browser opener and redirect URI for implicit auth flows.

The VS Code extension now uses vscode.env.openExternal (opens browser
on the client) and vscode.env.asExternalUri (resolves localhost to the
Codespaces forwarded port URL) so implicit OAuth works in remote
environments where the `open` package cannot reach the user's browser.
The content tree, webdav tree, and log tailing features use
configProvider.getInstance() which creates a B2CInstance with its own
internal auth resolution. Thread redirectUri and openBrowser through
OAuthAuthConfig, AuthConfig, createInstanceFromConfig, and
createB2CInstance so these features also use vscode.env.openExternal
in remote environments.
@clavery clavery merged commit cb74ce4 into main Mar 29, 2026
6 checks passed
@clavery clavery deleted the feature/implicit-auth-vscode-remote branch March 29, 2026 23:32
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