Skip to content

new social auth method github #655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
4 tasks done
jiangzhuo opened this issue Feb 9, 2025 · 0 comments
Open
4 tasks done

new social auth method github #655

jiangzhuo opened this issue Feb 9, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@jiangzhuo
Copy link

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

@jiangzhuo jiangzhuo added the enhancement New feature or request label Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant