Hi every body:
I try to make AuthController. I have setted "bcrypt" at app/config/packages/cartalyst/sentry/config .I think it can working, but get the error message "A user was found to match all plain text credentials however hashed credential [password] did not match."
AuthController:
<?php namespace App\Controllers\Admin;
use Auth, BaseController, Form, Input, Redirect, View, Hash, DB, Sentry;
class AuthController extends \BaseController {
/**
* Display the login page
* @return View
*/
public function getLogin()
{
return \View::make('default.admin.auth.login');
}
/**
* Login action
* @return Redirect
*/
public function postLogin()
{
$credentials = array(
'email' => Input::get('email'),
'password' => Input::get('password')
);
try
{
$user = Sentry::authenticate($credentials, false);
if ($user)
{
return Redirect::route('default.admin.blogs.index');
}
}
catch(\Exception $e)
{
return Redirect::route('admin.login')->withErrors(array('login' => $e->getMessage()));
}
}
Thank you for read.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community