docs: add local email testing guide and Express examples for Nodemailer - #13477
Open
tsokolovs wants to merge 1 commit into
Open
docs: add local email testing guide and Express examples for Nodemailer#13477tsokolovs wants to merge 1 commit into
tsokolovs wants to merge 1 commit into
Conversation
…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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
@tsokolovs is attempting to deploy a commit to the authjs Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
☕️ Reasoning
Two related gaps on the email/Nodemailer pages.
The Express and Qwik tabs were empty. On
providers/nodemailerand in the Nodemailer section ofauthentication/email, several framework tabs rendered the docs' ownExpress 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/prviate→private, twice —authentication/emailalready 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#configurationfor 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
--strictand 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
🎫 Affected issues
None.