feat(auth): OAuth-only signup with Microsoft provider#5073
Conversation
- Remove email/password form from /signup — Google, Microsoft, GitHub OAuth only - Add Microsoft as a social provider (MICROSOFT_CLIENT_ID / MICROSOFT_CLIENT_SECRET / DISABLE_MICROSOFT_AUTH) - Wire microsoftAvailable through provider checker, API contract, providers route, and all auth UI - Hide "Continue with email" in auth modal signup view; login view unchanged - Fix MicrosoftIcon SVG to use official brand colors and proportions
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryHigh Risk Overview Introduces Updates the Microsoft brand icon SVG. Includes a generated copilot tool-schema key style tweak (quoted keys → bare identifiers) with no behavioral change. Reviewed by Cursor Bugbot for commit e6d4bf2. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR adds Microsoft as a first-class OAuth provider and restricts new registrations to OAuth-only by hiding the email/password signup form while leaving email login untouched. The change is well-layered: server-side guard (
Confidence Score: 5/5Safe to merge — the email signup restriction is enforced at three independent layers so no single misconfiguration can bypass it, and the Microsoft OAuth wiring mirrors the existing Google/GitHub pattern throughout. All changed paths are straightforward additions that follow established patterns. The dual-layer email-signup guard is solid. No broken auth flows, no data exposure, no regressions in the login path. No files require special attention. The SVG coordinate/viewBox mismatch in icons.tsx and the hardcoded provider list in the auth hook error message are cosmetic nits. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User opens auth modal] --> B{view === signup?}
B -- yes --> C[Show OAuth buttons only]
B -- no / login --> D[Show OAuth buttons + Continue with email]
C --> E[OAuth redirect]
D --> F{Email clicked?}
F -- yes --> G[Redirect to /login page]
F -- no --> E
H[User visits /signup directly] --> I{emailEnabled?}
I -- yes --> J[Show email/password form + OAuth buttons]
I -- no --> K[Show OAuth buttons only]
J --> L[POST /sign-up/email]
L --> M{isEmailSignupDisabled in Better Auth hook?}
M -- yes --> N[403 FORBIDDEN]
M -- no --> O[Account created]
K --> E
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[User opens auth modal] --> B{view === signup?}
B -- yes --> C[Show OAuth buttons only]
B -- no / login --> D[Show OAuth buttons + Continue with email]
C --> E[OAuth redirect]
D --> F{Email clicked?}
F -- yes --> G[Redirect to /login page]
F -- no --> E
H[User visits /signup directly] --> I{emailEnabled?}
I -- yes --> J[Show email/password form + OAuth buttons]
I -- no --> K[Show OAuth buttons only]
J --> L[POST /sign-up/email]
L --> M{isEmailSignupDisabled in Better Auth hook?}
M -- yes --> N[403 FORBIDDEN]
M -- no --> O[Account created]
K --> E
Reviews (2): Last reviewed commit: "fix(config): restore isHosted hostname c..." | Re-trigger Greptile |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8ad4fe9. Configure here.
|
@greptile review |

Summary
Type of Change
Testing
Tested manually
Checklist