Chuyển tới nội dung chính

GitLab OAuth

Use the GitLab Applications page (or https://<your-gitlab>/-/profile/applications for self-hosted) to create an OAuth application.

Create the GitLab application

  1. Click Add new application.
  2. Set Name (e.g. "Casdoor"), Redirect URI, and Scopes.
cẩn thận

Enable scopes read_user and profile. Without them, authentication can fail.

thông tin

In GitLab, Redirect URI must be Casdoor’s callback URL. In Casdoor, the application Redirect URL is your application’s callback URL. See Application config.

  1. After creating the app, copy Application ID and Secret from the app details.

Add the provider in Casdoor

Create an OAuth provider, set Type to GitLab, and enter Application ID as Client ID and Secret as Client Secret.