antonioribeiro/google2fa-laravel

To many redirect on 2nd attempt

ruban-s opened this issue · 1 comments

Step to produce issue:

  1. Login 2fa account using wrong OTP and it will show error.

  2. Again enter generated 2fa code. and 2fa code verified but showing showing to many redirection

2fa

note:
pass window set as 1

To verify 2fa , I'm using separate controller function ,

**Route:**
Route::post('/2faVerify','AuthController@verifyredirect')->name('2faVerify')->middleware('2fa');

**Controller Function:**
public function verifyredirect(){
        
        return redirect(redirect()->intended('admin/dashboard')->getTargetUrl());
   }

Used Like this.