To enable the Auth0 OmniAuth provider, you must create an Auth0 account, and an application.
Sign in to the Auth0 Console. If you need to create an account, you can do so at the same link.
Select "New App/API".
Provide the Application Name ('GitSwarm' works fine).
Once created, you should see the Quick Start options. Disregard them and select 'Settings' above the Quick Start options.
test1234.auth0.com
t6X8L2465bNePWLOvt9yi41i
KbveM3nqfjwCbrhaUy_gDu2dss8TIlHIdzlyf33pB7dEK5u_NyQdp65O_o02hXs2
On your GitSwarm server, open the configuration file.
For package installation:
sudo editor /etc/gitswarm/gitswarm.rb
For source installations:
cd /home/git/gitlab
sudo -u git -H editor config/gitlab.yml
See Initial OmniAuth Configuration for initial settings.
Add the provider configuration:
For package installation:
gitlab_rails['omniauth_providers'] = [
{
"name" => "auth0",
"args" => { client_id: 'YOUR_AUTH0_CLIENT_ID'',
client_secret: 'YOUR_AUTH0_CLIENT_SECRET',
namespace: 'YOUR_AUTH0_DOMAIN'
}
}
]
For source installations:
- { name: 'auth0',
args: {
client_id: 'YOUR_AUTH0_CLIENT_ID',
client_secret: 'YOUR_AUTH0_CLIENT_SECRET',
namespace: 'YOUR_AUTH0_DOMAIN'
}
}
Change YOUR_AUTH0_CLIENT_ID
to the client ID from the Auth0 Console page from step 5.
Change YOUR_AUTH0_CLIENT_SECRET
to the client secret from the Auth0 Console page from step 5.
Save the file and reconfigure GitSwarm for the changes to take effect.
On the sign in page there should now be an Auth0 icon below the regular sign in form. Click the icon to begin the authentication process. Auth0 will ask the user to sign in and authorize the GitSwarm application. If everything goes well the user will be returned to GitSwarm and will be signed in.