File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,23 +39,21 @@ public function hasPasskeysEnabled(): bool
3939 */
4040 public function getPasskeyUserHandle (): string
4141 {
42- if (isset ($ this ->passkey_user_handle ) && ! empty ($ this ->passkey_user_handle )) {
43- return $ this ->passkey_user_handle ;
44- }
45-
4642 return (string ) $ this ->getKey ();
4743 }
4844
4945 /**
5046 * Get the display name for WebAuthn registration.
47+ * Shown in the authenticator UI as a human-friendly name.
5148 */
5249 public function getPasskeyDisplayName (): string
5350 {
54- return $ this ->name ?? $ this -> email ;
51+ return $ this ->email ;
5552 }
5653
5754 /**
5855 * Get the username for WebAuthn registration.
56+ * Used as the account identifier in the authenticator UI.
5957 */
6058 public function getPasskeyUsername (): string
6159 {
Original file line number Diff line number Diff line change 1414
1515 expect ($ options )->toBeInstanceOf (PublicKeyCredentialCreationOptions::class);
1616 expect ($ options ->user ->name )->toBe ('john@example.com ' );
17- expect ($ options ->user ->displayName )->toBe ('John Doe ' );
17+ expect ($ options ->user ->displayName )->toBe ('john@example.com ' );
1818});
1919
2020it ('excludes existing credentials from registration ' , function () {
You can’t perform that action at this time.
0 commit comments