From 8dd132369cb954f0b829fd23a52eb5b9170a05b3 Mon Sep 17 00:00:00 2001 From: janis steiner Date: Thu, 7 May 2026 23:01:02 +0200 Subject: [PATCH] fixing issues in passkey auth --- app-code/api/account/update_passkey.php | 4 ++-- app-code/api/login/check_passkey.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app-code/api/account/update_passkey.php b/app-code/api/account/update_passkey.php index 4c2a945..d0fa7c7 100644 --- a/app-code/api/account/update_passkey.php +++ b/app-code/api/account/update_passkey.php @@ -62,7 +62,7 @@ try { $formats[] = 'packed'; $formats[] = 'tpm'; - $rpId=$_SERVER['SERVER_NAME']; + $rpId = $_GET['rpId'] ?? $_SERVER['SERVER_NAME']; $typeUsb = true; $typeNfc = true; @@ -187,7 +187,7 @@ try { } catch (Throwable $ex) { $return = new stdClass(); $return->success = false; - $return->msg = 'Passkey registration failed.'; + $return->msg = 'Passkey registration failed: ' . $ex->getMessage(); header('Content-Type: application/json'); print(json_encode($return)); diff --git a/app-code/api/login/check_passkey.php b/app-code/api/login/check_passkey.php index 674fa2a..87f8c9f 100644 --- a/app-code/api/login/check_passkey.php +++ b/app-code/api/login/check_passkey.php @@ -47,7 +47,7 @@ try { $formats[] = 'packed'; $formats[] = 'tpm'; - $rpId=$_SERVER['SERVER_NAME']; + $rpId = $_GET['rpId'] ?? $_SERVER['SERVER_NAME']; $typeUsb = true; $typeNfc = true; @@ -185,7 +185,7 @@ try { } catch (Throwable $ex) { $return = new stdClass(); $return->success = false; - $return->msg = 'Passkey authentication failed.'; + $return->msg = 'Passkey authentication failed: ' . $ex->getMessage(); header('Content-Type: application/json'); print(json_encode($return));