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
Matvey
Matvey6mo ago
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.
The Copenhagen Book
The Copenhagen Book
A basic guideline on implementing auth for the web.
johnny  the fifth
johnny the fifthOP6mo ago
this seems like alot of stuff tbh
JulieCezar
JulieCezar5mo ago
If you don't want to do all that work, use Clerk Or Next-Auth, they have better docs imo
Want results from more Discord servers?
Add your server