Skip to content

Fix registration token subject#4205

Open
yZangEren wants to merge 2 commits into
SecureBananaLabs:mainfrom
yZangEren:fix-register-token-subject
Open

Fix registration token subject#4205
yZangEren wants to merge 2 commits into
SecureBananaLabs:mainfrom
yZangEren:fix-register-token-subject

Conversation

@yZangEren

@yZangEren yZangEren commented Jun 4, 2026

Copy link
Copy Markdown

Summary

  • Generate the registration user id once and reuse it for the returned user and JWT sub
  • Prevent mismatches when timestamp generation crosses a millisecond boundary during registration
  • Add a focused regression test that forces different timestamp values

Tests

  • node --test src\tests\auth.test.js src\tests\health.test.js
  • git diff --check

Closes #4203
Refs #743

/claim #743

Demo

github-actions Bot added a commit that referenced this pull request Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Registration token subject should match returned user id

1 participant