[MTM] Tweaks and fixes #120
1 changed files with 1 additions and 1 deletions
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
commit
4ed98c30b2
|
|
@ -254,7 +254,7 @@ class PasskeysController extends Controller
|
|||
], 400);
|
||||
}
|
||||
|
||||
$passkey = Passkey::firstWhere('passkey_id', $publicKeyCredential->id);
|
||||
$passkey = Passkey::firstWhere('passkey_id', Base64UrlSafe::encodeUnpadded($publicKeyCredential->rawId));
|
||||
if (! $passkey) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
|
|
|
|||
Loading…
Reference in a new issue