Support the ongoing development of Laravel.io →
Authentication

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.

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

shuli1984 shuli1984 Joined 7 May 2015

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.

© 2025 Laravel.io - All rights reserved.