diff --git a/composer.json b/composer.json index e846bd6..de5e772 100644 --- a/composer.json +++ b/composer.json @@ -16,5 +16,12 @@ "psr-4": { "Voh\\KmSocialite\\": "src/" } + }, + "extra": { + "laravel": { + "providers": [ + "Voh\\KmSocialite\\KmSocialiteServiceProvider" + ] + } } } diff --git a/src/KmSocialiteServiceProvider.php b/src/KmSocialiteServiceProvider.php new file mode 100644 index 0000000..3832b96 --- /dev/null +++ b/src/KmSocialiteServiceProvider.php @@ -0,0 +1,27 @@ +app->make(Factory::class); + $socialite->extend('km', function ($app) use ($socialite) { + $config = $app['config']['services.km']; + + return $socialite->buildProvider(KmSocialiteProvider::class, $config); + }); + } +}