Login-free trials using localStorage refresh tokens

1 7
calendar_todayschedule1 min read

I just posted on Hacker News about a pattern I implemented for letting users try my side project without signing up first.

The short version: click "Try it now", you're immediately in the dashboard with a working account. No email, no OAuth. A guest secret gets stored in localStorage, and if you come back later we swap it for a fresh JWT. Sign up for real whenever you want and your stuff transfers over.

I wrote up the security considerations (separate JWT keypairs for guests vs real users, hashed secrets, rate limiting, etc.) and the trade-offs I'm accepting (localStorage clearing = lost access, single device only).

Would love to hear if anyone else has done something similar or has thoughts on the approach.

Full post and discussion on HN: https://news.ycombinator.com/item?id=46244742

The project is Spikelog (simple metrics tracking) if you want to poke at the implementation: https://spikelog.com

2 Comments

2 votes
2
🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

TypeScript Complexity Has Finally Reached the Point of Total Absurdity

Karol Modelskiverified - Apr 23

Comparison: Universal Import vs. Plaid/Yodlee

Pocket Portfolio - Mar 12

Stop Implementing Authentication Inside Containers on Kubernetes

Alexandre Vazquez - Jul 25

Merancang Backend Bisnis ISP: API Pelanggan, Paket Internet, Invoice, dan Tiket Support

Masbadar - Mar 13

The Interface of Uncertainty: Designing Human-in-the-Loop

Pocket Portfolio - Mar 10
chevron_left
643 Points8 Badges
1Posts
1Comments
Sasquatch.

Commenters (This Week)

4 comments
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!