Skip to content

Remove magic link token from passwordless API response#119

Merged
Senthil455 merged 3 commits into
mainfrom
fix/issue-46-magic-link-token
Jun 17, 2026
Merged

Remove magic link token from passwordless API response#119
Senthil455 merged 3 commits into
mainfrom
fix/issue-46-magic-link-token

Conversation

@Senthil455

Copy link
Copy Markdown
Owner

Remove the raw passwordless token from the API response body to prevent token leakage. The token is still stored hashed in the database and verified via /auth/passwordless/verify. The response now only returns a generic success message.

Add backup_codes_shown flag to user_mfa table. Backup codes are only
returned on the initial setup request and marked as shown afterwards.
Re-running setup will regenerate codes but not display them. Add a
/mfa/rotate-backup-codes endpoint that requires current TOTP token
to view new backup codes.
Prevent token leak by removing the raw passwordless token from the API
response body. The token is still stored hashed in the database and can
be verified via /auth/passwordless/verify. The response now only returns
a generic success message.

@Senthil455 Senthil455 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple fix that removes the token leak from the passwordless response. The token is still stored and verified correctly on the verify endpoint.

@Senthil455 Senthil455 merged commit be1e997 into main Jun 17, 2026
3 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant