Subscribe for Free Tips, Tutorials, and Special Discounts
We're in this together!
We respect your privacy. Unsubscribe at any time.
Question: Should I "roll my own" auth?
Answer: In my opinion, definitely not. Registering with a service, logging in, logging out, these are "table stakes" in any application or SaaS. Unless your application is specifically an authorization provider there is no reason for you to build your own login flow from scratch.
Here are some of my reasons:
Another point in favor of using something off the shelf is the awesome next-auth library that makes it super easy to integrate with any number of service providers. With just a few lines of code you can allow folks to login, logout and you will have the user IDs, names and avatars you need to provide your service.
Share this article with your friends
Written by Jack Herrington
Jack Herrington is a Full Stack Principal Engineer who orchestrated the rollout of React/NextJS at Walmart Labs and Nike. He is also the "Blue Collar Coder" on YouTube where he posts weekly videos on advanced use of React and NextJS as well as other frontend technologies trends. His YouTube channel hosts an entire free courses on React and TypeScript. He has written seven books including most recently No-BS TypeScript which is a companion book to the YouTube course.