What does your rendered html looks like in your dev-tools?
my BOSS can't reset password -- I'm Looking BAD
I am getting a "The token field is required.” error when trying to reset a password. I have BOTH versions of the csrf setter in password.blade.php (I tried each separately and now both). I am using the HTML/Collective.
{!! Form::open(['role' => 'form', 'url' => '/password/email', 'class' => 'form-horizontal']) !!}
{!! Form::token() !!}
{!! csrf_field() !!}
Ialso have this in the VerifyCsrfToken middleware. Earlier I tried to delete the $middleware from App\Kernal.php and still was getting the error.
class VerifyCsrfToken extends BaseVerifier
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array
*/
protected $except = [
'/password/reset'
];
}
This has nothing to do with csrf token and has everything to do with not passing the password token.
In the reset stub, you'll see this line of code:
<input type="hidden" name="token" value="{{ $token }}">
You don't have that, and yes, it is different from the csrf_token.
Also, in the ResetsPassword file, you'll see this:
protected function getResetValidationRules()
{
return [
'token' => 'required',
'email' => 'required|email',
'password' => 'required|confirmed|min:6',
];
}
You'll see that the token is required.
Also, in the CreatePasswordResetsTable migration file, you'll see that one of the fields in the password_resets column is the token.
Basically, the token is used to figure out if the user trying to reset the password is valid. It checks to see if an email with that token exists in the password_resets table.
Please or to participate in this conversation.