Closed MazettePatacaisse closed 4 years ago
I should add a fallback to an array.
Fixed in commit.
Ok thanks nut it's not the real problem. My problem is than $credentials should not be empty........ Normal work 1) User enter password/email 2) On successfull auth -> redirect to 2fa page with password/email credentials in hidden input.
Actually credentials not handle in hidden input. why ??
i have tested with creating 2 hidden input with credentials, and 2fa works great......
I've fixed temporarily like this in auth.blade wainting best solution.
@if( request()->has('email') && request()->has('password'))
<input type="hidden" name="email" value="{{ request()->get('email') }}">
<input type="hidden" name="password" value="{{ request()->get('password') }}">
@endif
@if( request()->has('remember'))
<input type="hidden" name="remember" value="on">
@endif
You should check your guard since the credentials are retrieved using the Attempt event.
laravel version: 7.12
Facade\Ignition\Exceptions\ViewException Invalid argument supplied for foreach() (View: /resources/views/vendor/laraguard/auth.blade.php)
This error appears when 2fa is activated on a successfull login request at the 2fa step
$credentials is empty.