Skip to content

Commit

Permalink
prevent duplicate login event
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Jul 26, 2024
1 parent f1f47f3 commit b580fa6
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@

use Cone\Root\Http\Controllers\Controller;
use Cone\Root\Notifications\AuthCodeNotification;
use Illuminate\Auth\Events\Login;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Response as ResponseFactory;
use Illuminate\Support\Facades\URL;
Expand Down Expand Up @@ -57,10 +55,6 @@ public function login(Request $request): RedirectResponse

$request->session()->regenerate();

Event::dispatch(
new Login(Auth::getDefaultDriver(), $request->user(), $request->filled('remember'))
);

if ($request->user()->can('viewRoot') && $request->user()->shouldTwoFactorAuthenticate($request)) {
$request->user()->notify(
new AuthCodeNotification($request->user()->generateAuthCode())
Expand Down

0 comments on commit b580fa6

Please sign in to comment.