Send Auth.js magic links from Loops
Auth.js has a built-in Loops provider. Add two environment variables, and every magic link email comes from a template you design in Loops.
next-auth/providers/loopsYour sign-in link
Hi Sam, use the button below to sign in to Acme.
Sign in to AcmeA sign-in email you control
The subject, sender, and content all live in Loops.
Design it in Loops
Build the magic link email in the Loops editor and style it with the style panel instead of HTML.
Put the link anywhere
Add a url data variable to a button, text, or image, and Auth.js fills in each user’s sign-in link.
Edit it in Loops
Change the subject, From address, and content in Loops. Your Auth.js config only holds the API key and transactional ID.
See every send
Transactional email logs show which sign-in emails went out, when, and to whom.
How it connects
The Loops provider ships with Auth.js. The docs cover each step.
Create the email
Publish a transactional email in Loops with a data variable named url.
Add two variables
Add your Loops API key and the email’s transactional ID as two environment variables.
Use the Loops provider
Import Loops from next-auth/providers/loops and add it to your providers, next to your database adapter.
Frequently asked questions
Which Auth.js emails does Loops send?
Do I need a database adapter?
What should the data variable be called?
Where do I find the transactional ID?
Can I change the email without a code change?
Is there a free plan?