Login-free trials using localStorage refresh tokens

posted 1 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

More Posts

TypeScript Complexity Has Finally Reached the Point of Total Absurdity

Karol Modelskiverified - Apr 23

Comparison: Universal Import vs. Plaid/Yodlee

Pocket Portfolioverified - Mar 12

I’m a Senior Dev and I’ve Forgotten How to Think Without a Prompt

Karol Modelskiverified - Mar 19

Sovereign Intelligence: The Complete 25,000 Word Blueprint (Download)

Pocket Portfolioverified - Apr 1

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

Pocket Portfolioverified - Mar 10
chevron_left

Related Jobs

View all jobs →

Commenters (This Week)

1 comment
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!