diff --git a/routes/api.php b/routes/api.php index 810417e..3b99643 100644 --- a/routes/api.php +++ b/routes/api.php @@ -36,7 +36,7 @@ if(config('filament-accounts.features.contacts')){ - Route::middleware(['auth:sanctum'])->name('api.')->prefix('api/profile')->group(function (){ + Route::name('api.')->prefix('api/profile')->group(function (){ Route::post('contact',[\TomatoPHP\FilamentAccounts\Http\Controllers\APIs\ContactsController::class,'send'])->name('contact.send'); }); } diff --git a/src/Http/Controllers/APIs/AuthController.php b/src/Http/Controllers/APIs/AuthController.php index db34fa8..11b9023 100644 --- a/src/Http/Controllers/APIs/AuthController.php +++ b/src/Http/Controllers/APIs/AuthController.php @@ -64,7 +64,7 @@ public function login(Request $request): JsonResponse ]); $check = auth($this->guard)->attempt([ - "username" => $request->get($this->loginBy), + config('filament-accounts.login_by') => $request->get($this->loginBy), "password" => $request->get('password') ]);