]> BookStack Code Mirror - bookstack/commitdiff
Merge pull request #904 from lommes/903-socialite-discord
authorDan Brown <redacted>
Sun, 29 Jul 2018 15:18:10 +0000 (16:18 +0100)
committerGitHub <redacted>
Sun, 29 Jul 2018 15:18:10 +0000 (16:18 +0100)
add everything needed to use discord as social login provider

1  2 
.env.example
config/services.php

diff --combined .env.example
index d09db93d3a1bab9674ce10679140f959029dd569,68d2686357b2699c84e23eeb83d0054a6c72a6c3..eda20ea261bb9147a17dd451877fc42b5896311f
@@@ -56,6 -56,8 +56,8 @@@ TWITCH_APP_SECRET=fals
  GITLAB_APP_ID=false
  GITLAB_APP_SECRET=false
  GITLAB_BASE_URI=false
+ DISCORD_APP_ID=false
+ DISCORD_APP_SECRET=false
  
  # External services such as Gravatar and Draw.IO
  DISABLE_EXTERNAL_SERVICES=false
@@@ -67,13 -69,6 +69,13 @@@ LDAP_DN=fals
  LDAP_PASS=false
  LDAP_USER_FILTER=false
  LDAP_VERSION=false
 +# Do you want to sync LDAP groups to BookStack roles for a user
 +LDAP_USER_TO_GROUPS=false
 +# What is the LDAP attribute for group memberships
 +LDAP_GROUP_ATTRIBUTE="memberOf"
 +# Would you like to remove users from roles on BookStack if they do not match on LDAP
 +# If false, the ldap groups-roles sync will only add users to roles
 +LDAP_REMOVE_FROM_GROUPS=false
  
  # Mail settings
  MAIL_DRIVER=smtp
diff --combined config/services.php
index 9c550f2fada4bc5074407ff071dcfd83009760c2,05ec09ec0e9edda54e25546a1e0bd3f0f883bfcf..fab0c1d75ebb7f9df9a54df1a6ce26b81a233f4a
@@@ -108,6 -108,12 +108,12 @@@ return 
          'redirect' => env('APP_URL') . '/login/service/twitch/callback',
          'name'          => 'Twitch',
      ],
+     'discord' => [
+         'client_id' => env('DISCORD_APP_ID'),
+         'client_secret' => env('DISCORD_APP_SECRET'),
+         'redirect' => env('APP_URL') . '/login/service/discord/callback',
+         'name' => 'Discord',
+     ],
  
      'ldap' => [
          'server' => env('LDAP_SERVER', false),
          'version' => env('LDAP_VERSION', false),
          'email_attribute' => env('LDAP_EMAIL_ATTRIBUTE', 'mail'),
          'follow_referrals' => env('LDAP_FOLLOW_REFERRALS', false),
 -    ]
 +              'user_to_groups' => env('LDAP_USER_TO_GROUPS',false),
 +              'group_attribute' => env('LDAP_GROUP_ATTRIBUTE', 'memberOf'),
 +              'remove_from_groups' => env('LDAP_REMOVE_FROM_GROUPS',false),
 +      ]
  
  ];