4 #### Custom Socialite Service Example
6 The below shows an example of adding a custom reddit socialite service to BookStack.
7 BookStack exposes a helper function for this via `Theme::addSocialDriver` which sets the required config and event listeners in the platform.
9 The require statements reference composer installed dependencies within the theme folder. They are required manually since they are not auto-loaded like other app files due to being outside the main BookStack dependency list.
12 require "vendor/socialiteproviders/reddit/Provider.php";
13 require "vendor/socialiteproviders/reddit/RedditExtendSocialite.php";
15 Theme::listen(ThemeEvents::APP_BOOT, function($app) {
16 Theme::addSocialDriver('reddit', [
17 'client_id' => 'abc123',
18 'client_secret' => 'def456789',
20 ], '\SocialiteProviders\Reddit\RedditExtendSocialite@handle');