Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.

Commit e7bd0dd

Browse files
committed
fix: pad userId to 16 bytes for browser/authenticator compatibility
1 parent cb63226 commit e7bd0dd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

routes/passkeys.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ router.post('/passkeys/register/begin', authenticateToken, async (req, res) => {
5555
userDisplayName: user[0].username,
5656
attestationType: 'none',
5757
excludeCredentials,
58-
userId: new TextEncoder().encode(String(userId)),
58+
userId: new TextEncoder().encode(String(userId).padStart(16, '0')),
5959
});
6060

6161
challengeMap.set(userId, {

0 commit comments

Comments
 (0)