Skip to content

Commit 5f249b5

Browse files
committed
Fix ArrayObject conversion in AuthenticationService
1 parent 6fedb84 commit 5f249b5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Authentication/AuthenticationService.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,10 @@ public function authenticate(ServerRequestInterface $request): ResultInterface
149149
$result = $authenticator->authenticate($request);
150150
if ($result->isValid()) {
151151
$skipTwoFactorVerify = $authenticator->getConfig('skipTwoFactorVerify');
152-
$userData = $result->getData()->toArray();
152+
$userData = $result->getData();
153+
if ($userData instanceof EntityInterface) {
154+
$userData = $userData->toArray();
155+
}
153156
$webauthn2faChecker = $this->getWebauthn2fAuthenticationChecker();
154157
if ($skipTwoFactorVerify !== true && $webauthn2faChecker->isRequired($userData)) {
155158
return $this->proceedToWebauthn2fa($request, $result);

0 commit comments

Comments
 (0)