Skip to content
This repository was archived by the owner on Jul 5, 2019. It is now read-only.

OAuth integration

Jeremy Byron Schulz edited this page Apr 10, 2016 · 11 revisions

provider --> prov.&client --> client(scope from gl.mathhub)
github --> gl.mathhub --> mathub

github omniauth
gitlab omniauth

gitlab as oauth-provider
gitlab as oauth-client

gitlab oauth-client config template (line 156)
gitlab oauth-client config explanation (line 281)

run the following comands after configuration:
sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart

config (/etc/gitlab/gitlab.rb):

gitlab_rails['omniauth_enabled'] = true
gitlab_rails['omniauth_allow_single_sign_on'] = ['github']
gitlab_rails['omniauth_auto_sign_in_with_provider'] = false
gitlab_rails['omniauth_block_auto_created_users'] = false
gitlab_rails['omniauth_auto_link_ldap_user'] = false
gitlab_rails['omniauth_auto_link_saml_user'] = false
gitlab_rails['omniauth_providers'] = [
  {
    "name" => "github",
    "app_id" => "YOUR_APP_ID",
    "app_secret" => "YOUR_APP_SECRET",
    "url" => "https://github.com/",
    "args" => { "scope" => "user:email" }
  }
]

Gitlab ==> mathhub connection

auth endpoint
https://gl.mathhub.info/oauth/authorize
token endpoint
https://gl.mathhub.info/oauth/token
userinfo endpoint
https://gl.mathhub.info/api/v3/%scope%

for %scope% documentation check here

Clone this wiki locally