mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 16:13:54 +00:00
Changes to repair API auth
This commit is contained in:
@@ -50,9 +50,9 @@ class Authenticate
|
||||
|
||||
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'));
|
||||
if ('email_changed' === auth()->user()->blocked_code) {
|
||||
if ('email_changed' === Auth::guard($guard)->user()->blocked_code) {
|
||||
$message = strval(trans('firefly.email_changed_logout'));
|
||||
}
|
||||
|
||||
|
@@ -65,8 +65,8 @@ class RouteServiceProvider extends ServiceProvider
|
||||
*/
|
||||
protected function mapApiRoutes()
|
||||
{
|
||||
Route::prefix('api')
|
||||
->middleware('api')
|
||||
Route::prefix('api/v1')
|
||||
->middleware('auth:api')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/api.php'));
|
||||
}
|
||||
|
Reference in New Issue
Block a user