Just wondering what you use and why for authentication. I am currently working on a NextJS project and need to consider authentication. I’m accustomed to Clerk. It’s clear-cut and easy to understand… I believe that adopting nextAuth would be a better option in terms of scalability.
Whatever has sufficient community support and is simpler to accomplish. Consider details like as scalability with minimal concern. These things need time to work out and shouldn’t be too difficult to iterate on assuming you didn’t muck up the code right away. Before you consider altering the project’s architecture, it must gain a certain amount of traction.
I’m using AuthJS (formerly NextAuth) simply because of how fast I was able to implement SSO. Nothing more.
This. SSO was implemented using NextAuth as well, and Prisma took care of the rest. I suppose there’s no need to overthink this until we start seeing hundreds of thousands of users.
It really depends on the project’s stage of development.
In the early stages, I typically handle authentication myself—issuing credentials and serving access/refresh tokens as needed. These are simple processes, and there’s no point in using a third-party service when requirements are still evolving.
Later on, as user and scalability needs become clearer, you can choose a suitable third-party solution like Auth0, ForgeRock, or even run your own Keycloak instance.
There are a few amazing open source projects for Auth and works well. They would be secure and easy to use.
Any one of those solutions would probably scale. Used Clerk without issue with thousands of users. Every one has advantages and disadvantages.
Clerk: simple to set up, but not as customizable as I had hoped.Kinde is an excellent free tier for exploratory use.
I would simply choose the one that you can use rapidly and arrange so that you could swap it out with ease.
Scalability is well served by NextAuth; my experiences have been positive.