Skip to content

Commit

Permalink
fix: checking filament user and admin routing
Browse files Browse the repository at this point in the history
  • Loading branch information
joelbutcher committed Jul 18, 2024
1 parent d09ad52 commit f3b6e36
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Actions/AuthenticateOAuthCallback.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,18 @@ private function canRegister(mixed $user, mixed $account): bool
return false;
}

if ($this->hasComposerPackage('filament/filament')) {
return (Route::has('filament.auth.login') && Session::get('socialstream.previous_url') === route('filament.auth.login')) ||
(Route::has('filament.admin.auth.login') && Session::get('socialstream.previous_url') === route('filament.admin.auth.login')) ||
(Route::has('filament.auth.register') && Session::get('socialstream.previous_url') === route('filament.auth.register')) ||
(Route::has('filament.admin.auth.register') && Session::get('socialstream.previous_url') === route('filament.admin.auth.register'));
}

if (Route::has('register') && Session::get('socialstream.previous_url') === route('register')) {
return true;
}

if (Session::get('socialstream.previous_url') !== route('login')) {
if (Route::has('login') && Session::get('socialstream.previous_url') !== route('login')) {
return Features::hasGlobalLoginFeatures();
}

Expand Down

0 comments on commit f3b6e36

Please sign in to comment.