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
This commit is contained in:
parent
faf8e5c1ec
commit
4ed98c30b2
1 changed files with 1 additions and 1 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue