CodeNewbie Community 🌱

Sharon428931
Sharon428931

Posted on

Integrate GitHub OAuth with SafeLine in Minutes

Image description

SafeLine supports GitHub authentication, allowing users to securely log in to applications or websites using their GitHub identity. This feature requires a GitHub account.

Setting Up GitHub OAuth Application

Configuration Steps

  1. Go to GitHub, click on your personal account in the upper right corner, and find Settings
  2. In the left sidebar, click <> Developer Settings
  3. In the left sidebar, click OAuth Apps
  4. Click New OAuth App to configure your application information:
    • Application name: Your application name, which will be displayed on the user authentication page
    • Homepage URL: Your application URL, for example: https://a.com
    • Authorization callback URL: Authorization callback URL, needs to append /.safeline/auth/api/callback/github after the application URL, for example: https://a.com/.safeline/auth/api/callback/github
  5. After creating the application, obtain the application's ClientID and ClientSecret

Note: The Authorization callback URL is formed by appending /.safeline/auth/api/callback/github to the Homepage URL

SafeLine Configuration

Go to the Safeline Console's Auth -> Settings page, click on Third-Party Login Configuration, and select GitHub.

Configuration Fields

Field Description
ClientID GitHub application ID
ClientSecret GitHub application secret

After completing the configuration, click the Submit button to complete the binding.

Usage and Authentication Process

  1. After enabling the AUTH feature for the application, you can independently choose the GitHub login method.
  2. When users access the application, they will be prompted for authentication. After new users authenticate, Safeline administrators need to review and confirm in the console.
    • Users who pass the review will be authorized for this application. For subsequent access, no additional review is needed; they can successfully log in after authentication.
    • Users who have not passed the review will be blocked when attempting to access the application and cannot access it.

Join the SafeLine Community

Top comments (0)