mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fixed user login and authentication.
This commit is contained in:
@@ -26,6 +26,9 @@ class PasswordController extends Controller
|
||||
|
||||
use ResetsPasswords;
|
||||
|
||||
|
||||
protected $redirectPath = '/';
|
||||
|
||||
/**
|
||||
* Create a new password controller instance.
|
||||
*
|
||||
@@ -38,6 +41,7 @@ class PasswordController extends Controller
|
||||
$this->auth = $auth;
|
||||
$this->passwords = $passwords;
|
||||
|
||||
|
||||
$this->middleware('guest');
|
||||
}
|
||||
|
||||
|
@@ -41,7 +41,7 @@ class RedirectIfAuthenticated
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
if ($this->auth->check()) {
|
||||
return new RedirectResponse(url('/home'));
|
||||
return new RedirectResponse(url('/'));
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
|
@@ -127,12 +127,27 @@ Route::bind(
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* Auth\AuthController
|
||||
*/
|
||||
Route::get('/register', ['uses' => 'Auth\AuthController@getRegister', 'as' => 'register']);
|
||||
|
||||
Route::controllers(
|
||||
[
|
||||
'auth' => 'Auth\AuthController',
|
||||
'password' => 'Auth\PasswordController',
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* Home Controller
|
||||
*/
|
||||
Route::group(
|
||||
['middleware' => ['auth', 'range']], function () {
|
||||
Route::get('/', ['uses' => 'HomeController@index', 'as' => 'index']);
|
||||
Route::get('/home', ['uses' => 'HomeController@index', 'as' => 'home']);
|
||||
Route::get('/prev', ['uses' => 'HomeController@sessionPrev', 'as' => 'sessionPrev']);
|
||||
Route::get('/next', ['uses' => 'HomeController@sessionNext', 'as' => 'sessionNext']);
|
||||
Route::get('/jump/{range}', ['uses' => 'HomeController@rangeJump', 'as' => 'rangeJump']);
|
||||
@@ -327,14 +342,3 @@ Route::group(
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* Auth\AuthController
|
||||
*/
|
||||
Route::get('/register', ['uses' => 'Auth\AuthController@getRegister', 'as' => 'register']);
|
||||
|
||||
Route::controllers(
|
||||
[
|
||||
'auth' => 'Auth\AuthController',
|
||||
'password' => 'Auth\PasswordController',
|
||||
]
|
||||
);
|
||||
|
Reference in New Issue
Block a user