Bits & Pieces Part 1: They Said Passwordless Was Easy. They Lied. Here's How I Beat It Anyway.
<p><strong><em>Passwords are so 2004. Forget the endless string of forgotten passwords and “Reset your password” emails. In this first installment of our “Bits & Pieces” series, we’re peeling back the curtain on how to build a truly seamless, production‑ready passwordless authentication flow—complete with magic links, SMTP wizardry, and rock‑solid database integration. </em></strong></p><p><br/></p><p>Why am I doing this you might ask?</p><p><br/></p><p>I want an app that feels like magic—one click and you’re in. No typing, no typos, no ‘forgot password?’ panic. Onward!</p><p>But isn’t that just convenience?”</p><p>Convenience is just the tip of the iceberg. Underneath, it’s about seamless onboarding. Imagine a SaaS platform that reduces the friction logins brings.</p><p><em><br/></em></p><p><strong><em>The Hidden Perils of Passwords</em></strong></p><p><br/></p><p>Users today juggle dozens of credentials—two‑thirds of Americans, for instance, admit to reusing the same password across multiple accounts, exponentially raising breach risk.</p><p>Weak, easily guessed passwords like “123456” remain the most common worldwide, used over 4.5 million times in leaked datasets. In 2021 alone, breaches exposed over 22 billion records—many traced back to compromised or reused passwords. </p><p>Requiring users to memorize or reset passwords not only creates friction but also fuels those poor habits—and ultimately undermines security and UX </p><p><br/></p><p><strong><em>Magic Links: and Passwordless authentication: How They Work & Security Trade‑Offs</em></strong></p><p><br/></p><p>When a user submits their email, your backend generates a one‑time token, embeds it in a time‑limited link, and emails it via SMTP. Clicking the link validates the token, establishes a session, and logs them in—no password needed .</p><p>Short lifespans (e.g., 5–15 minutes) dramatically shrink the window for attackers to hijack a stolen link . Malicious sites can overlay invisible iframes or mimic your brand to trick users into clicking links they think are legitimate, always implement X‑Frame‑Options and clear branding in your email templates.</p><p>Some clients strip HTML links; including a plain‑text URL ensures deliverability but also gives attackers a copy‑paste vector—protect tokens with HTTPS and CSRF tokens on the endpoint.</p><p><br/></p><p>Invalidating tokens immediately after first use, prevents replay attacks—store a “used” flag in your database adapter </p><p><strong><em>Let's hack this thing already. </em></strong></p><p><br/></p><p>Well, first of all—a simple how-to on implementing passwordless authentication would suffice, right? Sure. Except that’s not how this really goes down.</p><p><br/></p><p>I wanted to understand this inside-out. Not just slap a package together and hope the auth gods smile on me. No. I wanted to own this flow. Because if a user is going to click one link and get inside my app, that link better be bulletproof. Ironclad. Magical.</p><p>So I started where anyone would—Google. "passwordless authentication <a class="tc-blue" href="https://Next.js" rel="noopener noreferrer" target="_blank">Next.js ↗</a>". The trail leads to <a class="tc-blue" href="https://Auth.js" rel="noopener noreferrer" target="_blank">Auth.js ↗</a>, formerly known as <a class="tc-blue" href="https://NextAuth.js" rel="noopener noreferrer" target="_blank">NextAuth.js ↗</a>. Ah. Rebranded. Just like a startup trying to sound cooler. Whatever. At least the docs exist.</p><p><br/></p><p>First impression? It’s good. Maybe too good. Like that one CS major who turns in perfect assignments but you know they're pasting from somewhere. The magic link section is buried under “Email Provider”—like it doesn’t want to be found. Classic.</p><p>But I read it. Twice. Then once more. Here’s what clicked:</p><p>- You give it an email.</p><p>- It fires off a POST request to `/api/auth/signin/email`.</p><p>- Behind the scenes, a one-time-use token is generated.</p><p>- That token is embedded into a link and emailed via your chosen SMTP provider.</p><p>- User clicks. Token is validated. Boom—they're in.</p><p>But here's where reality smacks you in the face: email providers. Ah yes. You can’t just send email. This isn’t the Wild West. Every provider has opinions.</p><p>Four hours. That’s how long I spent spinning up Mailgun, Resend, SendGrid, and Brevo. One rejected me. Another ghosted. Two others wanted "domain verification." And then I found Postmark.</p><p>Clean. Straightforward. But—requires a verified work email. Not Gmail. Not Yahoo. A real domain. Classic gatekeeping.</p><p>Fine.</p><p>So I hacked the system. Spun up a domain in Google Cloud. Used their $300 free trial to register a real work email. Slapped that on Postmark. Verified. Approved. API key in hand. No payment needed. Production-grade email: unlocked.</p><p><br/></p><p><strong>Now that’s a hack.</strong></p><p><em><br/></em></p><p><strong><em>Next stop: <a class="tc-blue" href="https://Auth.js" rel="noopener noreferrer" target="_blank">Auth.js ↗</a> integration.</em></strong></p><p>Here's the plan:</p><p>1. Add <a class="tc-blue" href="https://Auth.js" rel="noopener noreferrer" target="_blank">Auth.js ↗</a> to our <a class="tc-blue" href="https://Next.js" rel="noopener noreferrer" target="_blank">Next.js ↗</a> app.</p><p>2. Configure the email provider with Postmark using the API key.</p><p>3. Create the `/api/auth/[...nextauth].ts` file.</p><p>4. Use `providers: [EmailProvider({...})]` to hook in the magic link flow.</p><p>5. ENV file gets `POSTMARK_API_TOKEN`, `NEXTAUTH_SECRET`, and the rest.</p><p><br/></p><p>Boom. From 0 to passwordless in under 100 lines of code.</p><p>But this isn’t just about setup. It’s about **user experience**. Clean, crisp emails. Branded links. Instant sessions. No janky redirects. No weird toast notifications. Just… magic.</p><p><br/></p><p>And trust me, we’re just getting started.</p><p><br/></p><p><br/></p><p><br/></p><p><br/></p><p><br/></p><p><br/></p><p><br/></p><p>Next up: **building a custom login UI**, session callbacks, edge cases like expired links, and how to make this thing feel like you’re *signing into the future</p>
Bits & Pieces Part 1: They Said Passwordless Wa...
At the end of the month, we give out prizes in 3 categories: Best Content, Top Engagers and
Most Engaged Content.
Best Content
Top Engagers
Most Engaged Content
Best Content
We give out cash prizes to 7 people with the best insights in the past month. The 7 winners are picked
by an in-house selection process.
The winners are NOT picked from the leaderboards/rankings, we choose winners based on the quality, originality
and insightfulness of their content.
Top Engagers
For the Top Engagers Track, we award the top 3 people who engage the most with other user's content via
comments.
The winners are picked using the "Top Monthly Engagers" tab on the rankings page.
Most Engaged Content
The Most Engaged Content recognizes users whose content received the most engagement during the month.
We pick the top 3.
The winners are picked using the "Top Monthly Contributors" tab on the rankings page.
Here are a few other things to know for the Best Content track
1
Quality over Quantity — You stand a higher chance of winning by publishing a few really good insights across the entire month,
rather than a lot of low-quality, spammy posts.
2
Share original, authentic, and engaging content that clearly reflects your voice, thoughts, and opinions.
3
Avoid using AI to generate content—use it instead to correct grammar, improve flow, enhance structure, and boost clarity.
4
Explore audio content—high-quality audio insights can significantly boost your chances of standing out.
5
Use eye-catching cover images—if your content doesn't attract attention, it's less likely to be read or engaged with.
6
Share your content in your social circles to build engagement around it.
Contributor Rankings
The Rankings/Leaderboard shows the Top 20 contributors and engagers on TwoCents a monthly and all-time basis
— as well as the most active colleges (users attending/that attended those colleges)
The all-time contributors ranking is based on the Contributor Score, which is a measure of all the engagement and exposure a contributor's content receives.
The monthly contributors ranking tracks performance of a user's insights for the current month. The monthly and all-time scores are calcuated DIFFERENTLY.
This page also shows the top engagers on an all-time & monthly basis.
All-time Contributors
All-time Engagers
Top Monthly Contributors
Top Monthly Engagers
Most Active Colleges
Contributor Score
The all-time ranking is based on users' Contributor Score, which is a measure of all
the engagement and exposure a contributor's content receives.
Here is a list of metrics that are used to calcuate your contributor score, arranged from
the metric with the highest weighting, to the one with the lowest weighting.
1
Subscriptions received
2
Tips received
3
Comments (excluding replies)
4
Upvotes
5
Views
6
Number of insights published
Engagement Score
The All-time Engagers ranking is based on a user's Engagement Score — a measure of how much a
user engages with other users' content via comments and upvotes.
Here is a list of metrics that are used to calcuate the Engagement Score, arranged from
the metric with the highest weighting, to the one with the lowest weighting.
1
A user's comments (excluding replies & said user's comments on their own content)
2
A user's upvotes
Monthly Score
The Top Monthly Contributors ranking is a monthly metric indicating how users respond to your posts, not just how many you publish.
We look at three main things:
1
How strong your best post is —
Your highest-scoring post this month carries the most weight. One great post can take you far.
2
How consistent the engagement you receive is —
We also look at the average score of all your posts. If your work keeps getting good reactions, you get a boost.
3
How consistent the engagement you receive is —
Posting more helps — but only a little.
Extra posts give a small bonus that grows slowly, so quality always matters more than quantity.
In simple terms:
A great post beats many ignored posts
Consistently engaging posts beat one lucky hit
Spamming low-engagement posts won't help
Tips, comments, and upvotes from others matter most
This ranking is designed to reward
Thoughtful, high-quality posts
Real engagement from the community
Consistency over time — without punishing you for posting again
The Top Monthly Contributors leaderboard reflects what truly resonates, not just who posts the most.
Top Monthly Engagers
The Top Monthly Engagers ranking tracks the most active engagers on a monthly basis
Here is what we look at
1
A user's monthly comments (excluding replies & said user's comments on their own content)
2
A user's monthly upvotes
Most Active Colleges
The Most Active Colleges ranking is a list of the most active contributors on TwoCents, grouped by the
colleges/universities they attend(ed)
Here is what we look at
1
All insights posted by contributors that attended a particular school (at both undergraduate or postgraduate levels)
2
All comments posted by contributors that attended a particular school (at both undergraduate or postgraduate levels) —
excluding replies
Below is a list of badges on TwoCents and their designations.
Comments