[FEATURE REQUEST] Concept: smart login #331

Closed
opened 2026-03-13 07:42:02 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @emroot on GitHub (Dec 3, 2024).

Is your feature request related to a problem? Please describe.
The current sign-in/sign-up flow on most platforms is frustrating. Users often forget how they signed up (Google, Apple, email + password, etc.) and can accidentally create multiple accounts. Better Auth already does a great job with account linking for social providers, but the issue is when someone chooses to log in with email + password—there’s no easy way to figure out if:
• The email is connected to a social login (like Google or Apple) (I think you can link with social provider if exist but can be risky)
• It’s an email + password account, or
• There’s no account at all.

This makes it hard to show users the right flow and leads to a clunky user experience.

Describe the solution you’d like
It’d be great if Better Auth could expose an endpoint that, after a user enters their email, returns whether:
• The email is linked to a social login (e.g., Google or Apple),
• It’s an email + password account, or
• No account exists.

With this, I could dynamically show the right option. For example:
• If the email is linked to Google, show a “Log in with Google” button.
• If it’s email + password, show the email login form.
• If no account exists, show the sign-up flow.

This would make the whole process way more seamless for users.

Describe alternatives you’ve considered
• Writing custom logic outside Better Auth to figure this out, but that adds complexity and kind of defeats the purpose of using better-auth.
• Showing users a generic “Forgot how you signed up?” option, but that’s confusing and clunky.
• Letting users try random options until something works, which is frustrating and can lead to duplicate accounts.

Additional context
This feature fits perfectly with what Better Auth already does—making complex authentication workflows simpler and better for both developers and users. It’d be especially useful for platforms with multiple login options to reduce confusion and improve the overall experience.

Some screenshots of what I'm immagining

image

Found a Google social account
image

Found an Apple Social account
image

Found an email + password account
image

No account found. Default to email + password
image

Originally created by @emroot on GitHub (Dec 3, 2024). **Is your feature request related to a problem? Please describe.** The current sign-in/sign-up flow on most platforms is frustrating. Users often forget how they signed up (Google, Apple, email + password, etc.) and can accidentally create multiple accounts. Better Auth already does a great job with account linking for social providers, but the issue is when someone chooses to log in with email + password—there’s no easy way to figure out if: • The email is connected to a social login (like Google or Apple) (I think you can link with social provider if exist but can be risky) • It’s an email + password account, or • There’s no account at all. This makes it hard to show users the right flow and leads to a clunky user experience. **Describe the solution you’d like** It’d be great if Better Auth could expose an endpoint that, after a user enters their email, returns whether: • The email is linked to a social login (e.g., Google or Apple), • It’s an email + password account, or • No account exists. **With this, I could dynamically show the right option. For example:** • If the email is linked to Google, show a “Log in with Google” button. • If it’s email + password, show the email login form. • If no account exists, show the sign-up flow. This would make the whole process way more seamless for users. **Describe alternatives you’ve considered** • Writing custom logic outside Better Auth to figure this out, but that adds complexity and kind of defeats the purpose of using better-auth. • Showing users a generic “Forgot how you signed up?” option, but that’s confusing and clunky. • Letting users try random options until something works, which is frustrating and can lead to duplicate accounts. **Additional context** This feature fits perfectly with what Better Auth already does—making complex authentication workflows simpler and better for both developers and users. It’d be especially useful for platforms with multiple login options to reduce confusion and improve the overall experience. **Some screenshots of what I'm immagining** <img width="381" alt="image" src="https://github.com/user-attachments/assets/843bbc47-3aa5-4c82-9435-b0e64ab12ba9"> **Found a Google social account** <img width="381" alt="image" src="https://github.com/user-attachments/assets/b7184337-2fdc-4edb-b633-a18b61a9b6c4"> **Found an Apple Social account** <img width="381" alt="image" src="https://github.com/user-attachments/assets/05b02c97-709a-4720-9345-61c95d262191"> **Found an email + password account** <img width="381" alt="image" src="https://github.com/user-attachments/assets/86b30299-7340-47f2-a6fa-f09421ea7eea"> **No account found. Default to email + password** <img width="381" alt="image" src="https://github.com/user-attachments/assets/1ae8cad0-bca8-4c28-88b4-7e1c885e48e9">
GiteaMirror added the enhancement label 2026-03-13 07:42:02 -05:00
Author
Owner

@Bekacru commented on GitHub (Dec 5, 2024):

I think we could make this a plugin instead since it essentially allows unauthenticated users to see the accounts a user has linked. This might be fine in some cases but may not be ideal in others.

@Bekacru commented on GitHub (Dec 5, 2024): I think we could make this a plugin instead since it essentially allows unauthenticated users to see the accounts a user has linked. This might be fine in some cases but may not be ideal in others.
Author
Owner

@cbodin commented on GitHub (Feb 13, 2025):

I'm just about to implement better-auth (with this functionality as a requirement).

@emroot did you get anywhere with this?

This is pretty much missing from every auth provider out there, probably due to enabling email enumeration. But looking at some big players this is certainly used. E.g. https://tv.apple.com/.

@Bekacru Would a plugin supporting this be applicable for inclusion in the core library?

@cbodin commented on GitHub (Feb 13, 2025): I'm just about to implement better-auth (with this functionality as a requirement). @emroot did you get anywhere with this? This is pretty much missing from every auth provider out there, probably due to enabling email enumeration. But looking at some big players this is certainly used. E.g. https://tv.apple.com/. @Bekacru Would a plugin supporting this be applicable for inclusion in the core library?
Author
Owner

@dosubot[bot] commented on GitHub (Jun 14, 2025):

Hi, @emroot. I'm Dosu, and I'm helping the better-auth team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • You suggested a feature to identify account types linked to a user's email for a smoother login process.
  • @Bekacru proposed making this feature a plugin due to privacy concerns, which was well-received.
  • @cbodin showed interest in this feature for their implementation and asked about including it in the core library.

Next Steps:

  • Please let me know if this issue is still relevant to the latest version of the better-auth repository by commenting here.
  • If there is no further activity, this issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Jun 14, 2025): Hi, @emroot. I'm [Dosu](https://dosu.dev), and I'm helping the better-auth team manage their backlog. I'm marking this issue as stale. **Issue Summary:** - You suggested a feature to identify account types linked to a user's email for a smoother login process. - @Bekacru proposed making this feature a plugin due to privacy concerns, which was well-received. - @cbodin showed interest in this feature for their implementation and asked about including it in the core library. **Next Steps:** - Please let me know if this issue is still relevant to the latest version of the better-auth repository by commenting here. - If there is no further activity, this issue will be automatically closed in 7 days. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#331