- Account on Gitlab.com or you own self-hosted Gitlab instance
- Have Kanboard registered as application in Gitlab
The Gitlab authentication in Kanboard uses the OAuth 2.0 protocol, so any user of Kanboard can be linked to a Gitlab account.
That means you can use your Gitlab account to login on Kanboard.
- Go to your user profile
- Click on External accounts
- Click on the link Link my Gitlab Account
- You are redirected to the Gitlab authorization form
- Authorize Kanboard by clicking on the button Accept
- Your account is now linked
Now, on the login page you can be authenticated in one click with the link Login with my Gitlab Account.
Your name and email are automatically updated from your Gitlab Account if defined.
- On Gitlab, register a new application by following the official documentation
- In Kanboard, you can get the callback url in Settings > Integrations > Gitlab Authentication, just copy and paste the url
Either create a new config.php
file or rename the config.default.php
file and set the following values:
// Enable/disable Gitlab authentication
define('GITLAB_AUTH', true);
// Gitlab application id
define('GITLAB_CLIENT_ID', 'YOUR_APPLICATION_ID');
// Gitlab application secret
define('GITLAB_CLIENT_SECRET', 'YOUR_APPLICATION_SECRET');
Change these default values if you use a self-hosted instance of Gitlab:
// Gitlab oauth2 authorize url
define('GITLAB_OAUTH_AUTHORIZE_URL', 'https://gitlab.com/oauth/authorize');
// Gitlab oauth2 token url
define('GITLAB_OAUTH_TOKEN_URL', 'https://gitlab.com/oauth/token');
// Gitlab API url endpoint (don't forget the slash at the end)
define('GITLAB_API_URL', 'https://gitlab.com/api/v3/');
Kanboard uses these information from your Gitlab profile:
- Full name
- Email address
- Gitlab unique id
The Gitlab unique id is used to link the local user account and the Gitlab account.
Gitlab OAuth will work only with url rewrite enabled. At the moment, Gitlab doesn't support callback url with query string parameters. See Gitlab issue