Skip to content

Commit

Permalink
add currentDomain in route loop
Browse files Browse the repository at this point in the history
  • Loading branch information
bert-w committed Jun 25, 2024
1 parent 2a76722 commit b12c679
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
$domains = $panel->getDomains();

foreach ((empty($domains) ? [null] : $domains) as $domain) {
Filament::currentDomain($domain);

Route::domain($domain)
->middleware($panel->getMiddleware())
->name("socialite.{$panel->generateRouteName('oauth.redirect')}")
Expand All @@ -28,6 +30,8 @@
...config('filament-socialite.middleware'),
])
->name("socialite.{$panel->generateRouteName('oauth.callback')}");

Filament::currentDomain(null);
}
}

Expand Down

0 comments on commit b12c679

Please sign in to comment.