mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Changes to repair API auth
This commit is contained in:
@@ -50,9 +50,9 @@ class Authenticate
|
|||||||
|
|
||||||
return redirect()->guest('login');
|
return redirect()->guest('login');
|
||||||
}
|
}
|
||||||
if (1 === intval(auth()->user()->blocked)) {
|
if (1 === intval(Auth::guard($guard)->user()->blocked)) {
|
||||||
$message = strval(trans('firefly.block_account_logout'));
|
$message = strval(trans('firefly.block_account_logout'));
|
||||||
if ('email_changed' === auth()->user()->blocked_code) {
|
if ('email_changed' === Auth::guard($guard)->user()->blocked_code) {
|
||||||
$message = strval(trans('firefly.email_changed_logout'));
|
$message = strval(trans('firefly.email_changed_logout'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ class RouteServiceProvider extends ServiceProvider
|
|||||||
*/
|
*/
|
||||||
protected function mapApiRoutes()
|
protected function mapApiRoutes()
|
||||||
{
|
{
|
||||||
Route::prefix('api')
|
Route::prefix('api/v1')
|
||||||
->middleware('api')
|
->middleware('auth:api')
|
||||||
->namespace($this->namespace)
|
->namespace($this->namespace)
|
||||||
->group(base_path('routes/api.php'));
|
->group(base_path('routes/api.php'));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user