Skip to content

feat: add claim token for re-download without re-paying#32

Merged
keshav0479 merged 2 commits intokeshav0479:mainfrom
kanishka0411:fix/claim-token
Mar 25, 2026
Merged

feat: add claim token for re-download without re-paying#32
keshav0479 merged 2 commits intokeshav0479:mainfrom
kanishka0411:fix/claim-token

Conversation

@kanishka0411
Copy link
Collaborator

Fixes #31

Adds a claim token so buyers can re-download if they close the tab after paying. Token is stored in localStorage, expires after 1 hour. New claim endpoint on the server side with rate limiting. Also added tests and a db migration for the new columns.

Copy link
Owner

@keshav0479 keshav0479 left a comment

Choose a reason for hiding this comment

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

hey nice work! one thing to fix:

  • add a format check on the token query param, reject anything that's not 64 hex chars before hitting the db

also minor: claim token regen block in pay.ts is duplicated, cleaner as a helper but not blocking

@keshav0479 keshav0479 dismissed their stale review March 25, 2026 08:38

all feedback addressed

@keshav0479
Copy link
Owner

lgtm, merging

@keshav0479 keshav0479 merged commit 5f01da0 into keshav0479:main Mar 25, 2026
1 check 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.

Re-download without re-paying: claim token after successful payment

2 participants