Skip to content

feature request: new social auth method github #655

@jiangzhuo

Description

@jiangzhuo

Description

Introduction

The SaaS Boilerplate currently supports multiple social authentication providers. To enhance its flexibility and attract more developers, we propose integrating GitHub as an additional social authentication method. This will allow users to sign in using their GitHub credentials, streamlining the authentication process for developers and technical users.

Benefits of Adding GitHub Authentication

  • Developer-Friendly: Many users of SaaS platforms are developers, making GitHub authentication a natural fit.

Describe the solution you'd like

1. Configure GitHub OAuth Application

  • Register a new OAuth application in the GitHub Developer Portal.
  • Set callback URLs and define necessary permissions.
  • Obtain Client ID and Client Secret.

2. Modify Backend Authentication

  • Extend the existing authentication module to support GitHub OAuth.
  • Implement GitHub login endpoints.
  • Use OAuth libraries to handle authentication.
  • Store user information (GitHub ID, email, profile URL) in the database.

3. Update Frontend Authentication Flow

  • Add a "Sign in with GitHub" button to the authentication UI.
  • Modify the authentication context to handle GitHub OAuth responses.
  • Redirect users to the GitHub authentication page and handle token exchanges.

4. Environment Configuration

  • Add GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET to environment variables.
  • Update configuration files to include GitHub OAuth settings.

Describe alternatives you've considered

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions