Skip to content

Commit c83a51f

Browse files
authored
Merge pull request #904 from lommes/903-socialite-discord
add everything needed to use discord as social login provider
2 parents b922c80 + 93795b6 commit c83a51f

File tree

7 files changed

+57
-9
lines changed

7 files changed

+57
-9
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ TWITCH_APP_SECRET=false
5656
GITLAB_APP_ID=false
5757
GITLAB_APP_SECRET=false
5858
GITLAB_BASE_URI=false
59+
DISCORD_APP_ID=false
60+
DISCORD_APP_SECRET=false
5961

6062
# External services such as Gravatar and Draw.IO
6163
DISABLE_EXTERNAL_SERVICES=false

app/Providers/EventServiceProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class EventServiceProvider extends ServiceProvider
2020
'SocialiteProviders\Okta\OktaExtendSocialite@handle',
2121
'SocialiteProviders\GitLab\GitLabExtendSocialite@handle',
2222
'SocialiteProviders\Twitch\TwitchExtendSocialite@handle',
23+
'SocialiteProviders\Discord\DiscordExtendSocialite@handle',
2324
],
2425
];
2526

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', 'gitlab', 'twitch'];
19+
protected $validSocialDrivers = ['google', 'github', 'facebook', 'slack', 'twitter', 'azure', 'okta', 'gitlab', 'twitch', 'discord'];
2020

2121
/**
2222
* SocialAuthService constructor.

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"socialiteproviders/microsoft-azure": "^3.0",
2121
"socialiteproviders/okta": "^1.0",
2222
"socialiteproviders/gitlab": "^3.0",
23-
"socialiteproviders/twitch": "^3.0"
23+
"socialiteproviders/twitch": "^3.0",
24+
"socialiteproviders/discord": "^2.0"
2425
},
2526
"require-dev": {
2627
"filp/whoops": "~2.0",

composer.lock

Lines changed: 44 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/services.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@
108108
'redirect' => env('APP_URL') . '/login/service/twitch/callback',
109109
'name' => 'Twitch',
110110
],
111+
'discord' => [
112+
'client_id' => env('DISCORD_APP_ID'),
113+
'client_secret' => env('DISCORD_APP_SECRET'),
114+
'redirect' => env('APP_URL') . '/login/service/discord/callback',
115+
'name' => 'Discord',
116+
],
111117

112118
'ldap' => [
113119
'server' => env('LDAP_SERVER', false),
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)