From 55b73283c68252c30bc4bac21a688853c1226242 Mon Sep 17 00:00:00 2001 From: ildyria Date: Thu, 25 Aug 2022 00:25:17 +0200 Subject: [PATCH] allow user credential to be a id = 0 --- .gitignore | 3 ++- src/Http/Requests/AssertionRequest.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c612ac8..3614327 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ /build /vendor /.idea +/.vscode .php-cs-fixer.cache .phpunit.result.cache composer.lock -phpunit.xml.bak \ No newline at end of file +phpunit.xml.bak diff --git a/src/Http/Requests/AssertionRequest.php b/src/Http/Requests/AssertionRequest.php index c6c750d..64e7f8d 100644 --- a/src/Http/Requests/AssertionRequest.php +++ b/src/Http/Requests/AssertionRequest.php @@ -121,7 +121,7 @@ class AssertionRequest extends FormRequest */ protected function findUser(WebAuthnAuthenticatable|array|int|string|null $credentials): ?WebAuthnAuthenticatable { - if (!$credentials) { + if ($credentials === null) { return null; }