Skip to content

feat: show social provider hint for social-only users on email login#5833

Open
capJavert wants to merge 1 commit intomainfrom
eng-1207-better-auth-show-try-signing-in-with-googlegithub-for-social
Open

feat: show social provider hint for social-only users on email login#5833
capJavert wants to merge 1 commit intomainfrom
eng-1207-better-auth-show-try-signing-in-with-googlegithub-for-social

Conversation

@capJavert
Copy link
Copy Markdown
Contributor

@capJavert capJavert commented Apr 2, 2026

Summary

  • When the API returns a SOCIAL_ACCOUNT_ONLY error code during email sign-in, show a distinct message instead of the generic "Invalid email or password"
  • Add socialAccountOnly label: "It looks like you signed up with a different method. Try signing in with your social provider instead."
  • Log the error code alongside the displayed error for analytics tracking

Key decisions

  • Generic provider message: Uses "your social provider" rather than naming the specific provider to avoid leaking account information to unauthenticated users
  • Companion PR: Works with daily-api#3771 which adds the server-side SOCIAL_ACCOUNT_ONLY detection

Changed files

  • packages/shared/src/hooks/useLogin.ts — Check res.code for social-only detection
  • packages/shared/src/lib/labels.ts — Add socialAccountOnly error label
  • packages/shared/src/components/auth/LoginForm.tsx — Render distinct alert for social-only users

Closes ENG-1207


Created by Huginn 🐦‍⬛

Preview domain

https://eng-1207-better-auth-show-try-si.preview.app.daily.dev

When the API returns a SOCIAL_ACCOUNT_ONLY error code during email
sign-in, display a helpful message directing the user to sign in with
their social provider instead of the generic invalid credentials error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview Apr 2, 2026 8:22am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
storybook Ignored Ignored Apr 2, 2026 8:22am

Request Review

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