Using the latest version I get this little problem, in the documentation says that you have to add this method to the controller to authenticate (This in the Login Controller)
public function authenticate()
{
if (Auth::attempt(['email' => $email, 'password' => $password])) {
// Authentication passed...
return redirect()->intended('dashboard');
}
}
Another thing I use to authenticate is the username instead of the email and change the values to:
public function authenticate(){
if (Auth::attempt(['username' => $username, 'password' => $password])) {
// Authentication passed...
return redirect()->route('blog.index');
}
}
And when you log in you send me the index directly, try to make a dd of $ email and simply log in and go to the index, as if you were not authenticate
I have in my LoginController
public function authenticate(){
if (Auth::attempt(['username' => $username, 'password' => $password, 'activo' => 1],$remember)) {
return redirect()->login('index');
}else{
return redirect()->route('debeconfirmar');
}
}
If the user enters their data well, but also confirm their account will send it to the index is your account is active, but if the user entered your account with the correct data but does not confirm the email immediately send it to a page who will inform you of the process to confirm your account.
The problem is that if the user enters the correct data and is not 'active' he / she does the login in the same way and goes to the index page