Support the ongoing development of Laravel.io →
Authentication
Last updated 2 years ago.
0

Your controller login method has no branch for failed authentication. At the end of userLogin add another Redirect::back() or other logic

0

Some notes in the code block below...

 /**
* Accepts the post request for login
* of user in CMS
*
*/
public function userLogin()
{
...

// returns validation object if fails, nothing if passes

// the single = looks off, but I normally don't make if's with var assignments in it

if ($errors = User::loginIsInvalid($user_credentials))
{
return Redirect::route('cms.login')->withInput()->withErrors($errors);
}

// if this passes then redirect to route('cms.home')

if (Auth::attempt(array(
'email' => $user_credentials['email'],
'password' => $user_credentials['password']), $remember_me))
{
return Redirect::route('cms.home');
}

// ??? what happens if auth fails it returns nothing, aka the white screen

} 

Hope that helps

0

Sign in to participate in this thread!

Eventy

Your banner here too?

lozadaOmr lozadaomr Joined 11 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.