fix deserialize
Deploy / deploy (push) Successful in 31s

This commit is contained in:
2026-05-07 23:06:26 +02:00
parent 24f3baad0a
commit 5be6047574
+2 -2
View File
@@ -166,7 +166,7 @@ try {
$data->userDisplayName = $userDisplayName;
// Store registration data in the database
$credentialId = $data->credentialId instanceof \lbuchs\WebAuthn\Binary\ByteBuffer ? $data->credentialId->getBinaryString() : $data->credentialId;
$credentialId = $data->credentialId instanceof \lbuchs\WebAuthn\Binary\ByteBuffer ? $data->credentialId->getBinaryString() : (string)$data->credentialId;
$credentialPublicKey = $data->credentialPublicKey;
$signatureCounter = (int)$data->signatureCounter;
$stmt = $conn->prepare("UPDATE users set credential_id = ?, public_key = ?, counter = ?, auth_method_enabled_passkey = 1, auth_method_required_passkey = 1 WHERE username = ?");
@@ -187,7 +187,7 @@ try {
} catch (Throwable $ex) {
$return = new stdClass();
$return->success = false;
$return->msg = 'Passkey registration failed: ' . $ex->getMessage();
$return->msg = 'Passkey registration failed: ' . $ex->getMessage() . ' (credentialId type: ' . (is_object($data->credentialId ?? null) ? get_class($data->credentialId) : gettype($data->credentialId ?? null)) . ')';
header('Content-Type: application/json');
print(json_encode($return));