Skip to content

Commit

Permalink
fix gurad driver passkey empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaomlove committed Jul 27, 2023
1 parent 2c3b36f commit d2f5a2d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/Providers/AuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ public function boot()
});

Auth::viaRequest('passkey', function (Request $request) {
return User::query()->where('passkey', $request->passkey)->first();
$passkey = $request->passkey;
if (empty($passkey)) {
return null;
}
return User::query()->where('passkey', $passkey)->first();
});

}
Expand Down

0 comments on commit d2f5a2d

Please sign in to comment.