Send Better Auth emails from Loops
Call Loops from Better Auth’s email callbacks to send verification, password reset, magic link, and one-time code emails, each from its own Loops template.
sendResetPasswordsendVerificationEmailsendMagicLinksendVerificationOTPReset your password
Hi Sam, we got a request to reset your Acme password. Choose a new one with the button below.
Reset passwordEvery auth method covered
Email and password, magic link, and email OTP each get their own templates.
Verify and reset
Email and password sign-in sends verification and password reset emails with the URL and token from Better Auth.
Magic links
The magic link plugin’s sendMagicLink callback sends each link through your Loops template.
One-time codes
Email OTP covers sign in, email verification, and password reset, with the code in a data variable.
Designed in Loops
Build each email in the Loops editor and add the data variables Better Auth fills in.
How it connects
A small server helper sends each email with the Loops SDK. The docs include the full code.
Install the SDK
Add the Loops JavaScript SDK with npm i loops, then set your API key and transactional IDs.
One server helper
A helper calls sendTransactionalEmail. Keep it on the server so your API key stays private.
Better Auth callbacks
sendVerificationEmail, sendResetPassword, sendMagicLink, and sendVerificationOTP each call the helper.
Frequently asked questions
Which Better Auth emails can Loops send?
How does Better Auth call Loops?
Do the data variable names matter?
Should the callbacks await the send?
Why aren’t my Better Auth emails sending?
Is there a free plan?