Guide to Configure Gitlab as an OAuth Server



If you want users to login to your WordPress site using their Gitlab credentials, you can simply do it using our WP OAuth Client plugin. Once you configure the Gitlab with WordPress plugin, you can allow users to SSO to your WordPress site using Gitlab. Similarly, you can map your WordPress roles based on your Gitlab attributes/groups. To know more about other features we provide in WP OAuth Client plugin, you can click here.

Follow the Step-by-Step Guide to configure Gitlab with WordPress :

  • First of all, go to https://gitlab.com/profile and log into your box account.
  • gitlab1
  • Go to Applications ​tab.
  • Add Name of your application and Redirect URI.
    Most importantly, Redirect URI is the URI where the user will be sent after authorization.
  • gitlab2
  • Make sure you chose the scope that fits your need.
    Most importantly, the scope chosen here should also be same as the entry on the MO OAuth​ Configuration
  • gitlab3
  • Click on Save. You will be shown the Application ID and Secret.
  • gitlab4 gitlab5
  • Copy Application ID as Client ID and Secret as Client Secret in MO OAuth Plugin configuration.
  • Click on Save Settings
  • You can download OAuth Client plugin using the following link.
    OAuth Single Sign On – SSO (OAuth client)

    GitLab Endpoints and Scope:

    Client ID : from the step 5 above
    Client Secret : from the step 5 above
    Scope: read_user
    Authorize Endpoint: https://gitlab.com/oauth/authorize
    Access Token Endpoint: https://gitlab.com/oauth/token
    Get User Info Endpoint: https://gitlab.com/api/v4/user

Free Trial

If you are facing any difficulty please mail us on info@xecurify.com.