# GitLab OmniAuth plugin

**URL:** <https://meta.discourse.org/t/gitlab-omniauth-plugin/24382>\
**Category:** Plugin\
**Tags:** auth-plugins\
**Created:** [January 24, 2015, 12:52am UTC](https://meta.discourse.org/t/gitlab-omniauth-plugin/24382 "2015-01-24T00:52:41Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![axil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/axil/32/81682_2.png) [@axil](https://meta.discourse.org/u/axil)\
**Post date:** [January 24, 2015, 12:52am UTC](https://meta.discourse.org/t/gitlab-omniauth-plugin/24382/1 "2015-01-24T00:52:41Z")

</div>

Source code: [GitLab.org / discourse-omniauth-gitlab · GitLab](https://gitlab.com/gitlab-org/discourse-omniauth-gitlab)

> ⚠ **Attention**
> 
> This is supported on GitLab 7.7+.

## Installation

First, register a new system application in GitLab by visiting `/admin/applications/new`.  
The redirect URI is of the form:

```plaintext
https://discourse.example.com/auth/gitlab/callback

```

Add the plugin’s repository url to your container’s `app.yml` file:

```plaintext
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - mkdir -p plugins
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://gitlab.com/gitlab-org/discourse-omniauth-gitlab.git

```

Rebuild the container by providing the APP\_ID, SECRET and GitLab url values:

```plaintext
cd /var/discourse
git pull origin master
GITLAB_APP_ID=gitlabtestid GITLAB_SECRET=gitlabtestsecret GITLAB_URL=https://git.example.com ./launcher rebuild app

```

Otherwise you can add these variables in `app.yml` under the `env` section.

 ![](https://global.discourse-cdn.com/meta/original/3X/c/1/c118b4da08f7042f19489777f05093ecbdd71413.png)

---

_[View the full topic](https://meta.discourse.org/t/gitlab-omniauth-plugin/24382)._
