@@ -55,35 +55,25 @@ public function getPasskeyUserHandle(): string
5555 *
5656 * Shown prominently in authenticator UIs (registration prompts,
5757 * account pickers, password manager entries). Falls back from
58- * `name` to `email` to an opaque label derived from the user
59- * handle when those columns are absent.
58+ * `name` to `email` to the auth identifier when columns are absent.
6059 */
6160 public function getPasskeyDisplayName (): string
6261 {
6362 return $ this ->getAttribute ('name ' )
6463 ?? $ this ->getAttribute ('email ' )
65- ?? $ this ->fallbackPasskeyLabel ();
64+ ?? ( string ) $ this ->getAuthIdentifier ();
6665 }
6766
6867 /**
6968 * Get the username for WebAuthn registration.
7069 *
7170 * Used as the account identifier in authenticator UIs, typically
7271 * rendered as the subtitle beneath the display name. Falls back
73- * to an opaque label derived from the user handle when `email`
74- * is absent.
72+ * from `email` to the auth identifier when the column is absent.
7573 */
7674 public function getPasskeyUsername (): string
7775 {
7876 return $ this ->getAttribute ('email ' )
79- ?? $ this ->fallbackPasskeyLabel ();
80- }
81-
82- /**
83- * An opaque, stable label used when no name or email is available.
84- */
85- protected function fallbackPasskeyLabel (): string
86- {
87- return 'user- ' .substr (bin2hex ($ this ->getPasskeyUserHandle ()), 0 , 10 );
77+ ?? (string ) $ this ->getAuthIdentifier ();
8878 }
8979}
0 commit comments