Skip to content

Feature: Implement Google Authentication for Sign-in and Sign-up #452

Description

@Dev1822

Context & Goal
As a user, I want to be able to sign up and log in using my Google account so that I can access the platform quickly without needing to create and remember a new password. Implementing this will reduce friction during onboarding and improve conversion rates.

Acceptance Criteria

  • Users can see a "Continue with Google" button on both the Sign-in and Sign-up pages.
  • Clicking the button initiates the standard Google OAuth 2.0 flow.
  • New Users: If a user authenticates with Google for the first time, a new account is automatically created in our database using their Google email, name, and profile picture.
  • Existing Users: If a user with that email already exists, they are seamlessly logged in and linked to their existing account.
  • Proper error handling is implemented (e.g., if the user cancels the Google auth flow or if there's a network issue), displaying user-friendly error messages.
  • Authentication state is properly maintained (sessions/JWTs are issued just like email/password login).
  • The implementation follows security best practices (e.g., state parameter for CSRF protection if applicable).

Technical Considerations

  • Create and configure a new OAuth client in the Google Cloud Console.
  • Set up the appropriate redirect URIs for development, staging, and production environments.
  • Define necessary scopes (typically email and profile).
  • Ensure the database schema can securely store the OAuth provider ID (e.g., google_id) and handle users who don't have a traditional password.

Dependencies

  • Google Cloud Console Project setup (Requires Admin access).
  • Secrets management: Need to securely store GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET in environment variables.

I would like to work on this issue if assigned

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions