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
- Please refer to the GitHub official documentation to create a GitHub OAuth application and obtain the application's
ClientIDandClientSecret
Configuration Steps
- Go to GitHub, click on your personal account in the upper right corner, and find
Settings - In the left sidebar, click
<> Developer Settings - In the left sidebar, click
OAuth Apps - Click
New OAuth Appto 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/githubafter the application URL, for example:https://a.com/.safeline/auth/api/callback/github
-
- After creating the application, obtain the application's
ClientIDandClientSecret
Note: The Authorization callback URL is formed by appending
/.safeline/auth/api/callback/githubto 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
- After enabling the
AUTHfeature for the application, you can independently choose the GitHub login method. - 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.
Top comments (1)
Great tutorial, thanks!