feat(levelcode): add "Continue with GitHub" to the Cloud login - #85
Merged
Conversation
Adds a GitHub button beside Google. The backend already accepts `github` on the
same oauth_start/oauth_callback path (it was the reference provider in web_spec),
so this is purely the front door: ProviderSignIn now renders both providers via a
shared ProviderLink, reusing the same PKCE-paired oauth_start URL builder and the
<a> link semantics.
Verified in the dev preview: both buttons render in-theme (Google G, GitHub mark)
and link to /ai/auth/oauth/{google,github}. tsc -b and eslint clean.
Go-live (a human task, like Google): create a GitHub OAuth App with callback
https://levelcode.ai/ai/auth/callback and set GITHUB_OAUTH_ID / GITHUB_OAUTH_SECRET
in the EB env — unlike Google there's no existing client to reuse.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds GitHub as an additional social login option on the LevelCode Cloud /ai/login page by refactoring the existing Google provider button into a reusable provider-link component and introducing a GitHub icon.
Changes:
- Refactors the Google-only sign-in link into a reusable
ProviderLinkused by multiple providers. - Adds a “Continue with GitHub” link alongside “Continue with Google”.
- Introduces a GitHub mark SVG icon for the new provider button.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+39
to
+44
| }: { | ||
| provider: string; | ||
| label: string; | ||
| redirectUri?: string; | ||
| codeChallenge?: string; | ||
| children: ReactNode; |
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.
What
Adds a Continue with GitHub button beside Google on
/ai/login.The backend already does the work —
oauth_start/oauth_callbackacceptgithub(it was the reference provider inweb_spec), so this is purely the front door.ProviderSignInnow renders both providers through a sharedProviderLink, reusing the same PKCE-pairedoauth_startURL builder and<a>link semantics from the Google PR.Verified in the dev preview
Both buttons render in-theme (Google G, GitHub mark) and the anchors resolve to:
tsc -bandeslintclean. No backend change (github already works and is tested).Go-live (human task — like Google)
Unlike Google (which reused the existing
GOOGLE_CLIENT_ID), GitHub has no existing client to reuse, so:https://levelcode.ai/ai/auth/callback.GITHUB_OAUTH_ID+GITHUB_OAUTH_SECRETin the EB env.Then GitHub sign-in completes end-to-end: web →
/ai/account, editor → thelevelcode://deep-link.🤖 Generated with Claude Code