Registration form errors causes a redirect to login instead of showing errors
Whenever there is an error on my Spark registration form (invalid email, name is blank, password too short, etc.), Spark redirects me to the login form instead of displaying errors on the registration form. Registration works just fine if all fields are filled with valid data.
However, I found out that if I remove the guest middleware check from spark/src/Http/Controllers/Auth/RegisterController.php like this:
/**
* Create a new authentication controller instance.
*
* @return void
*/
public function __construct()
{
// $this->middleware('guest');
$this->redirectTo = Spark::afterLoginRedirect();
}
then logged in as a user and tried to register with invalid data, the errors will display correctly on the form without a redirect.
Does anyone have an idea on why this is happening and how to go about correcting this behavior? I haven't made any changes to the original Spark registration code.
Please or to participate in this conversation.