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 AcmeBuild the magic link email in the Loops editor and style it with the style panel instead of HTML.
Add a url data variable to a button, text, or image, and Auth.js fills in each user’s sign-in link.
Change the subject, From address, and content in Loops. Your Auth.js config only holds the API key and transactional ID.
Add your Loops API key and the email’s transactional ID as two environment variables.
Which Auth.js emails does Loops send?
Magic link emails, which go out when a user tries to sign in with their email address. The Loops provider sends each one with the transactional email you set up in Loops.
Do I need a database adapter?
Yes. Auth.js needs a database adapter for magic link authentication, so configure one before you add the Loops provider.
What should the data variable be called?
url. Auth.js passes each user’s magic link as url, so the data variable in your Loops email must use that exact name. You can add it to a button, text, or image link.
Where do I find the transactional ID?
Open the email in Loops and click through to the Publish page, where the Transactional ID is listed. Your API key is under Settings, API.
Can I change the email without a code change?
Yes. The subject, From address, reply-to address, and content are all managed in Loops. When you edit the email, the published version keeps sending until you click Republish.
Is there a free plan?
Yes. The free plan includes unlimited contacts and up to 4,000 emails to your first 1,000 contacts in any rolling 30-day window, marketing and transactional combined. Upgrade to send to more subscribed contacts.