Add email+password and GitHub sign-in (unblock app-directory reviewers)#532
Open
w1ne wants to merge 2 commits into
Open
Add email+password and GitHub sign-in (unblock app-directory reviewers)#532w1ne wants to merge 2 commits into
w1ne wants to merge 2 commits into
Conversation
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.
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.
Why
KernelCAD's sign-in (the modal and the
/signinpage) 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
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).SignInButtonis now provider-aware (google|github), with the correct brand mark per provider.VITE_GITHUB_AUTH_ENABLEDso 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
EmailPasswordForm.test.tsx(sign-in success/error, sign-up),SignInButton.github.test.tsx(provider routing). 6/6 green.tsc -bclean,eslintclean, fullnpm run buildpasses.demo@kernelcad.cominto 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 setVITE_GITHUB_AUTH_ENABLED=trueto light up the button.