Skip to content

[FEATURE]: Add Google, GitHub, and LinkedIn Social Authentication #179

Description

@Gautam25Raj

Affected Apps / Packages

Server (apps/server), Studio (apps/studio)

Is your feature request related to a problem?

Yes. Currently, users are restricted to standard authentication flows (e.g., email OTP or username/password). This introduces sign-up friction, leading to lower user conversion rates. Users expect modern platforms to support seamless, single-click authentication via popular social identity providers.

Describe the solution you'd like

We want to integrate social authentication providers for Google, GitHub, and LinkedIn to simplify the onboarding process.

  1. Frontend (apps/site):

    • Add high-quality, brand-consistent "Continue with Google", "Continue with GitHub", and "Continue with LinkedIn" buttons to the sign-up and sign-in pages.
    • Support smooth redirects and loading state animations while authentication is in progress.
  2. Backend (apps/server):

    • Configure better-auth in index.ts to enable google, github, and linkedin social providers.
    • Load required client credentials (GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, etc.) via environment configuration in config.ts.
    • Configure automatic account linking so that a user signing up with a social provider using the same email as an existing account will have their accounts securely merged.
  3. Database Integration:

    • Ensure the Prisma adapter handles the social account mappings (Account table) correctly.

Describe alternatives you've considered

  • Staying with Email OTP Only: High friction, does not meet modern UX expectations.
  • Custom OAuth Implementation: Writing custom OAuth handlers would require significant security auditing, maintenance, and setup, whereas better-auth already provides secure, production-tested wrappers.

Additional Context

  • We will need to register developer applications on Google Console, GitHub settings, and LinkedIn developer portals.
  • The environment variables in .env must be updated with the respective Client IDs and Secrets.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Fields

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions