Self-Hosted
Learn how to create an OAuth application and obtain a Client ID and Client Secret in GitLab Self-Hosted.
Generate Client ID and Secret in GitLab Self-Hosted
Follow these steps to create an OAuth application in GitLab Self-Hosted and obtain the Client ID and Client Secret.
1. Register an OAuth Application
-
Log in to your GitLab Self-Hosted instance.
-
Navigate to Admin Area → Applications (
/admin/applications
), -
or go to User Settings → Applications (
/-/profile/applications
) for user-specific tokens. -
Click “New application”.
-
Fill in the required details:
-
Scopes: The following scopes are required for different areas:
read_api
: For basic API access to GitLab endpointsread_user
: For accessing user informationread_repository
: For accessing repository data and branches, reading and accessing issueswrite_repository
: For creating merge requests and managing webhooks, creating and managing issuesapi
: For general API access to all repository endpoints, managing CI/CD variables and secrets. Creating, updating, and deleting webhooksopenid
: Required for OpenID Connect authenticationprofile
: Access to basic profile informationemail
: Access to user email information
-
Trusted: Check this box for allowed Plexicus to use application credentials as a trusted first-party application.
-
Name: Enter a meaningful name for the application.
-
Redirect URI: Enter this callback URL:
https://covulor.plexicus.com/api/callback/gitlab
- Click “Save application”.
2. Get Client ID and Client Secret
Ensure you select the required scopes (openid
, profile
, email
,
read_api
, read_user
, read_repository
, write_repository
, api
). We
follow the principle of least privilege and only request permissions that are
essential for Plexicus’s functionality. These scopes provide the necessary
access for authentication and repository operations while maintaining
security.
After saving the application, GitLab will generate:
- Application ID (Client ID): Used as the
client_id
. - Secret (Client Secret): Used as the
client_secret
.
These credentials will be used in the next step to obtain an access token.
Keep your Client Secret private and never expose it in public repositories or frontend applications.
Next, you can proceed to exchanging an authorization code for an access token. 🚀