Support the ongoing development of Laravel.io →
Configuration Authentication Database
Last updated 1 year ago.
0

You don't need token in POST. You use that for the GET request. You could simply do.

    $credentials = Input::only([
        'email',
        'password',
        'password_confirmation'
    ]);
Last updated 1 year ago.
0

Check your config/auth.php to see what you have set for the reminder table.

The default is

	'reminder' => array(

		'email' => 'emails.auth.reminder',

		'table' => 'password_reminders',

		'expire' => 60,

	),
Last updated 1 year ago.
0

Thanks for the replies. I had the remove the token from the credentials like geocine said.

The EloquentUserProvider (Illuminate\Auth ) retrieveByCredentials just loops trough the array and adds it to the query.

public function retrieveByCredentials(array $credentials)
{
	// First we will add each credential element to the query as a where clause.
	// Then we can execute the query and, if we found a user, return it in a
	// Eloquent User "model" that will be utilized by the Guard instances.
	$query = $this->createModel()->newQuery();

	foreach ($credentials as $key => $value)
	{
		if ( ! str_contains($key, 'password')) $query->where($key, $value);
	}

	return $query->first();
}
Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

jazpur jazpur Joined 11 Feb 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.