Implement OIDC authentication via Laravel Socialite

This commit is contained in:
2026-04-26 16:32:53 -04:00
parent c0176f9924
commit c2c9464133
11 changed files with 605 additions and 3 deletions
+3
View File
@@ -16,6 +16,9 @@ class EventServiceProvider extends ServiceProvider
'App\Events\Event' => [
'App\Listeners\EventListener',
],
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
\SocialiteProviders\OIDC\OIDCExtendSocialite::class.'@handle',
],
];
/**
@@ -18,8 +18,30 @@ use Illuminate\Routing\Middleware\SubstituteBindings;
use Illuminate\Session\Middleware\StartSession;
use Illuminate\View\Middleware\ShareErrorsFromSession;
use Filament\Support\Facades\FilamentView;
use Illuminate\Support\Facades\Blade;
class AdminPanelProvider extends PanelProvider
{
public function boot()
{
FilamentView::registerRenderHook(
'panels::auth.login.form.after',
fn (): string => Blade::render('
<div class="mt-4">
<x-filament::button
:href="url(\'auth/social/oidc\')"
tag="a"
color="info"
class="w-full"
>
Login with OIDC
</x-filament::button>
</div>
'),
);
}
public function panel(Panel $panel): Panel
{
return $panel