which method is better for authentication
i am building an app using mysql , next js , nodejs-express , socket io i am currently in the phase of authentication and registering users in my database with all of their info (email,username,password etc..) the question is do i just encrypt users password in my database when they register into my App or do i use an authentication solution , the registeration data will be sent to the express server where the insertion process will take place in my database when the user sign in i am planning to use jwt with cookies probably or do i use an authentication solution this is my first time building a fullstack app .
3 Replies
Check out the copenhagen book from the creator of lucia auth - https://thecopenhagenbook.com/ . It has everything you need to know about rolling your own auth.
this seems like alot of stuff tbh
If you don't want to do all that work, use Clerk
Or Next-Auth, they have better docs imo