Skip to content

docs: add local email testing guide and Express examples for Nodemailer - #13477

Open
tsokolovs wants to merge 1 commit into
nextauthjs:mainfrom
tsokolovs:docs/nodemailer-express-and-local-testing
Open

docs: add local email testing guide and Express examples for Nodemailer#13477
tsokolovs wants to merge 1 commit into
nextauthjs:mainfrom
tsokolovs:docs/nodemailer-express-and-local-testing

Conversation

@tsokolovs

@tsokolovs tsokolovs commented Aug 7, 2026

Copy link
Copy Markdown

☕️ Reasoning

Two related gaps on the email/Nodemailer pages.

The Express and Qwik tabs were empty. On providers/nodemailer and in the Nodemailer section of authentication/email, several framework tabs rendered the docs' own Express not documented yet. placeholder, so a reader on those frameworks had nothing to copy. This fills in the missing Express tabs (both transport forms, plus the HTML sign-in button) and the missing Qwik tab on the configuration-object block. While in there, $env/dynamic/prviateprivate, twice — authentication/email already spells it correctly, so it's a typo rather than a convention, and it silently breaks copy-paste.

Receiving a magic link locally isn't documented. Because the provider sends over SMTP, trying it out means either owning a real mailbox or configuring a real mail service, and every sign-in attempt sends real mail from your machine. The new guide points the transport at an SMTP catcher on localhost instead, so the link shows up in a local inbox and nothing leaves the machine. It links to providers/nodemailer#configuration for the provider setup rather than repeating it, so there's still one source of truth, and it adds a Playwright example that reads the link back out over the catcher's HTTP API — covering the real verification-token flow end to end instead of mocking the transport.

Scoped to Nodemailer, with a callout saying so: Resend, Sendgrid and Postmark send over HTTP, so an SMTP catcher won't intercept them.

Every snippet was executed rather than eyeballed. All the Express/Qwik configs type-check under --strict and boot; the guide's flow was run end to end against Next.js 15 with a real adapter, confirming the magic link arrives, signs in, and that the token is single-use. The Playwright example runs green. Happy to adjust the framing or the tool referenced if you'd prefer something different here.

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

None.

…uide

The Express and Qwik tabs on the Nodemailer pages rendered a "not
documented yet" placeholder, so readers on those frameworks had no
example to copy. Fill them in and fix a `$env/dynamic/prviate` typo that
broke copy-paste in the Svelte tabs.

Also add a guide for receiving magic links locally, since testing the
Nodemailer provider otherwise needs a real mailbox and sends real mail
on every sign-in attempt.
@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
auth-docs Ready Ready Preview Aug 7, 2026 11:14am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
next-auth-docs Ignored Ignored Preview Aug 7, 2026 11:14am

Request Review

@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

@tsokolovs is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

@tsokolovs tsokolovs changed the title docs: add Express examples for Nodemailer and a local email testing guide docs: add local email testing guide and Express examples for Nodemailer Aug 7, 2026
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