1 Next Auth
I completed the backend part of t3 tutorial today.
The author introduced Next Auth with Email Provider in a very well motivated way.
The idea behind the Email Provider is that the website would send an email to the user’s email address; the email would contain a “magic link” with which the user can log in.
The concept is intuitive, but to set it up and run it on a local machine is not easy: at the least, you’d need too set up some kind of service such as Mailgun or Resend.
So the author of the tutorial devised a clever trick: instead of going through the email, the “magic link” is logged to the console, so that whoever is following along can try it out without going through the email set up.
But that begs the obvious question: how then do you set this up in production?
2 Resend
There are a lot of tutorials out there, and I was lucky to have chanced upon a suitable tutorial on the Resend platform right off the bat.
I had seen Resend on Vercel’s recommended list of email services, so I have some grounds to hope for a smooth experience when deploying.
3 Sivers
The next step after the Resend quick start tutorial is to send emails out to different email addresses without restriction.
But as I learned earlier with Mailgun, at this point a custom domain is required: something that very likely needs to be paid for.
I am a fan of Derek Sivers, author of Anything You Want, and recall a Tech Independence page on his website. The very first thing he talked about was buying a domain.
So I followed the tutorial and bought a domain for a year. Fortunately, after adding the required info, the domain is very quickly verified!
I look forward to sending out custom domain emails next time I come back to this.