Skip to content

Commit

Permalink
fix: Username login errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dogukanoksuz committed Sep 25, 2024
1 parent 0ba3bab commit a3ea2d9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/Http/Controllers/API/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ public function setupTwoFactorAuthentication(Request $request)
$user = User::where(function ($query) use ($validator) {
$query->where('email', $validator->validated()["email"])
->orWhere('username', $validator->validated()["email"]);
})->where('auth_type', 'local')
->first();
})->first();

if (! $user) {
return response()->json(['message' => 'Kullanıcı adı veya şifreniz yanlış.'], 401);
Expand Down

0 comments on commit a3ea2d9

Please sign in to comment.