Skip to content

Commit 9becc80

Browse files
committed
Merge branch 'support_for_gitlub_auth' of git://github.com/pixwell-dev/BookStack into pixwell-dev-support_for_gitlub_auth
2 parents 1d49b65 + 194bb0f commit 9becc80

7 files changed

Lines changed: 57 additions & 5 deletions

File tree

.env.example

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ OKTA_BASE_URL=false
5050
OKTA_APP_ID=false
5151
OKTA_APP_SECRET=false
5252

53+
GITLAB_APP_ID=false
54+
GITLAB_APP_SECRET=false
55+
GITLAB_BASE_URI=false
56+
5357
# External services such as Gravatar
5458
DISABLE_EXTERNAL_SERVICES=false
5559

@@ -67,4 +71,4 @@ MAIL_HOST=localhost
6771
MAIL_PORT=1025
6872
MAIL_USERNAME=null
6973
MAIL_PASSWORD=null
70-
MAIL_ENCRYPTION=null
74+
MAIL_ENCRYPTION=null

app/Providers/EventServiceProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class EventServiceProvider extends ServiceProvider
1818
'SocialiteProviders\Slack\SlackExtendSocialite@handle',
1919
'SocialiteProviders\Azure\AzureExtendSocialite@handle',
2020
'SocialiteProviders\Okta\OktaExtendSocialite@handle',
21+
'SocialiteProviders\GitLab\GitLabExtendSocialite@handle',
2122
],
2223
];
2324

app/Services/SocialAuthService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class SocialAuthService
1616
protected $socialite;
1717
protected $socialAccount;
1818

19-
protected $validSocialDrivers = ['google', 'github', 'facebook', 'slack', 'twitter', 'azure', 'okta'];
19+
protected $validSocialDrivers = ['google', 'github', 'facebook', 'slack', 'twitter', 'azure', 'okta', 'gitlab'];
2020

2121
/**
2222
* SocialAuthService constructor.

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"barryvdh/laravel-snappy": "^0.4.0",
1919
"socialiteproviders/slack": "^3.0",
2020
"socialiteproviders/microsoft-azure": "^3.0",
21-
"socialiteproviders/okta": "^1.0"
21+
"socialiteproviders/okta": "^1.0",
22+
"socialiteproviders/gitlab": "^3.0"
2223
},
2324
"require-dev": {
2425
"filp/whoops": "~2.0",

composer.lock

Lines changed: 38 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/services.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,15 @@
9292
'redirect' => env('APP_URL') . '/login/service/okta/callback',
9393
'base_url' => env('OKTA_BASE_URL'),
9494
'name' => 'Okta',
95-
],
95+
],
96+
97+
'gitlab' => [
98+
'client_id' => env('GITLAB_APP_ID'),
99+
'client_secret' => env('GITLAB_APP_SECRET'),
100+
'redirect' => env('APP_URL') . '/login/service/gitlab/callback',
101+
'instance_uri' => env('GITLAB_BASE_URI'), // needs only for GitLab self hosted
102+
'name' => 'Gitlab',
103+
],
96104

97105
'ldap' => [
98106
'server' => env('LDAP_SERVER', false),

resources/assets/icons/gitlab.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)