mirror of
https://github.com/brufdev/many-notes.git
synced 2026-05-17 15:48:23 -05:00
Refactor code
This commit is contained in:
@@ -36,19 +36,7 @@ final class AppServiceProvider extends ServiceProvider
|
||||
$this->configureDates();
|
||||
$this->configureModels();
|
||||
$this->configureVite();
|
||||
|
||||
Event::listen(function (SocialiteWasCalled $event): void {
|
||||
$event->extendSocialite('authelia', AutheliaProvider::class);
|
||||
});
|
||||
Event::listen(function (SocialiteWasCalled $event): void {
|
||||
$event->extendSocialite('authentik', AuthentikProvider::class);
|
||||
});
|
||||
Event::listen(function (SocialiteWasCalled $event): void {
|
||||
$event->extendSocialite('keycloak', KeycloakProvider::class);
|
||||
});
|
||||
Event::listen(function (SocialiteWasCalled $event): void {
|
||||
$event->extendSocialite('zitadel', ZitadelProvider::class);
|
||||
});
|
||||
$this->configureSocialite();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -75,4 +63,23 @@ final class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
Vite::useAggressivePrefetching();
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure Laravel Socialite extra providers.
|
||||
*/
|
||||
private function configureSocialite(): void
|
||||
{
|
||||
Event::listen(function (SocialiteWasCalled $event): void {
|
||||
$event->extendSocialite('authelia', AutheliaProvider::class);
|
||||
});
|
||||
Event::listen(function (SocialiteWasCalled $event): void {
|
||||
$event->extendSocialite('authentik', AuthentikProvider::class);
|
||||
});
|
||||
Event::listen(function (SocialiteWasCalled $event): void {
|
||||
$event->extendSocialite('keycloak', KeycloakProvider::class);
|
||||
});
|
||||
Event::listen(function (SocialiteWasCalled $event): void {
|
||||
$event->extendSocialite('zitadel', ZitadelProvider::class);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user