feat(extension): Auth0 sign-in for the VSCode extension#717
Open
nirooba98 wants to merge 3 commits into
Open
Conversation
Add a browser-based Auth0 login flow targeting GitHub as the identity provider. The extension opens the Auth0 universal-login URL in the user's default browser, receives the authorization code back via a vscode://codepathfinder.secureflow/auth-callback URI handler, and exchanges it for tokens using PKCE — no client secret is embedded since the Auth0 application is a Native (public) client. Tokens and the userinfo payload are stored in SecretStorage; an AuthService singleton fans out session changes to a status bar item (\$(github) <handle> / Sign in) and to a thin AuthHeader strip at the top of the sidepanel webview that exposes Sign in / Sign out controls. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replace the built-in \$(github) glyph in the Code Pathfinder status bar item with the brand /p. mark, registered as a custom codicon via contributes.icons. A new scripts/build-icon-font.mjs flattens the source SVG's transforms and merges its paths through svgpath (because svgicons2svgfont, used internally by svgtofont, ignores transforms, honors only the first <path>, and assumes a zero-origin viewBox), then emits .woff/.woff2 into resources/icon-font/. The font is ~1 KB and ships with the published vsix; the scripts/ directory is excluded. Re-run with: npm run build:icon-font Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Replace the thin AuthHeader strip with a dedicated, gating login page
inspired by the developer's mockup: centered /p. logo, tagline, and
provider buttons (Google, GitHub, Microsoft) plus Continue as Guest.
Once a session exists, the existing onboarding/profiles/settings/
profileDetails views render below a top-right ProfileMenu (avatar,
handle, click-to-open dropdown with Sign out).
AuthService.login() now takes an Auth0Connection ('github' |
'google-oauth2' | 'windowslive') instead of relying on a hardcoded
constant. A tagged Session union ({kind:'user'|'guest'|'none'}) is
broadcast through onDidChangeSession and persisted alongside
SecretStorage tokens via a globalState flag for guest mode. The
webview gates rendering on session.kind, leaving the panel blank
until the initial auth:state reply lands to avoid a login-page
flash.
The Microsoft button is committed but currently hidden via comment;
re-enable after the Auth0 windowslive social connection is wired.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
SafeDep Report SummaryPackage Details
This report is generated by SafeDep Github App |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Adds Auth0-backed sign-in to the Code Pathfinder VSCode extension with a redesigned sidepanel login page.
vscode://codepathfinder.secureflow/auth-callbackURI scheme; tokens stored inSecretStorage.b95b9fe— Initial PKCE flow +AuthServicesingleton + status bar item +AuthHeaderstrip in the sidepanel.8ba2a51— Custom/p.codicon registered viacontributes.icons; replaces\$(github)in the status bar. Includesnpm run build:icon-fontfor regenerating the WOFF.f35ae59— Dedicated sidepanel login gate (Google, GitHub, Microsoft, Continue as Guest) andProfileMenuwidget;AuthServicegeneralized to aSessionunion, multi-providerconnectionarg, and guest mode.client_secretexists for this app type.Test plan
🤖 Generated with Claude Code