Skip to content

Add email+password and GitHub sign-in (unblock app-directory reviewers)#532

Open
w1ne wants to merge 2 commits into
developfrom
feat/email-github-auth
Open

Add email+password and GitHub sign-in (unblock app-directory reviewers)#532
w1ne wants to merge 2 commits into
developfrom
feat/email-github-auth

Conversation

@w1ne

@w1ne w1ne commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Why

KernelCAD's sign-in (the modal and the /signin page) offered only Google OAuth. Automated app-directory reviewers — and any sandbox that can't complete a Google consent flow or logs in from a datacenter IP Google blocks — get stuck at login and fail the review. This adds a login path that always works.

What

  • Email + password form on both sign-in surfaces. Sign-in resolves a session immediately (no email round-trip), so a pre-seeded demo account (demo@kernelcad.com) is usable by reviewers. The email provider is already enabled in Supabase. Form supports sign-up too (honours email-confirmation if the project requires it).
  • SignInButton is now provider-aware (google | github), with the correct brand mark per provider.
  • GitHub button added, but gated behind VITE_GITHUB_AUTH_ENABLED so it never renders as a dead end until the GitHub OAuth app is registered and the provider is enabled in Supabase. Email+password and Google are live now.

Tests / verification

  • Unit: EmailPasswordForm.test.tsx (sign-in success/error, sign-up), SignInButton.github.test.tsx (provider routing). 6/6 green.
  • tsc -b clean, eslint clean, full npm run build passes.
  • Manual browser test against live Supabase: typed demo@kernelcad.com into the new form on /signin → signed in → landed in authenticated Studio. GitHub button correctly hidden with the flag off.

Follow-up (not in this PR)

Register a GitHub OAuth app (callback https://obfnkeinokgqgczrgqme.supabase.co/auth/v1/callback), set client id/secret on the Supabase GitHub provider, then set VITE_GITHUB_AUTH_ENABLED=true to light up the button.

w1ne added 2 commits June 26, 2026 00:31
The sign-in surfaces (modal and /signin page) previously offered only
Google OAuth, which blocks automated app-directory reviewers and any
environment that cannot complete a Google consent flow. Add an
email+password form (works against the already-enabled email provider,
no email round-trip on sign-in) and a GitHub OAuth button.

The GitHub button is gated behind VITE_GITHUB_AUTH_ENABLED until the
GitHub OAuth app is registered and the provider is enabled in Supabase,
so it never renders as a dead end. Email+password and Google are live.

Includes unit tests for the form (sign-in, error, sign-up) and the
provider-aware SignInButton.
The GitHub OAuth app is registered and the GitHub provider is enabled
in Supabase Auth, so light up the gated button in the deployed app by
setting VITE_GITHUB_AUTH_ENABLED at build time.
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