[MTM] Tweaks and fixes #120

Merged
jonny merged 3 commits from develop into main 2026-08-21 17:08:14 +02:00
Showing only changes of commit 4ed98c30b2 - Show all commits

Fix undefined property error on passkey login

Webauthn\PublicKeyCredential has no $id property (only $rawId,
inherited from Credential). Every passkey login attempt was throwing
Undefined property: Webauthn\PublicKeyCredential::$id and failing
with a 500. Encode $rawId the same way it's stored during
registration to look up the matching Passkey record.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LHN7V9kyZxrsxaspMSqoGJ
Jonny Barnes 2026-08-21 15:32:09 +01:00
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8

View file

@ -254,7 +254,7 @@ class PasskeysController extends Controller
], 400); ], 400);
} }
$passkey = Passkey::firstWhere('passkey_id', $publicKeyCredential->id); $passkey = Passkey::firstWhere('passkey_id', Base64UrlSafe::encodeUnpadded($publicKeyCredential->rawId));
if (! $passkey) { if (! $passkey) {
return response()->json([ return response()->json([
'success' => false, 'success' => false,