#Best Practice Authentication (Username-Password)
1 messages · Page 1 of 1 (latest)
Hey! There's a bit on authentication at https://nextjs.org/docs/authentication
There are also loads of pre-existing solutions, as building secure authentication is difficult and not usually recommended from a security standpoint.
Some of the most known solutions are
https://next-auth.js.org/
https://supertokens.com/ (My personal favourite for small projects)
https://www.ory.sh/kratos/ (mainly for larger projects)
https://auth0.com/ (mainly for enterprise projects)
The nextjs page links some others such as Clerk, Firebase and magic.link
Just for session management, this can be done with
https://github.com/vvo/iron-session
Or
I believe supertokens also offers a 'recipe' for session management at https://supertokens.com/docs/session/introduction which is the same solution used in BlitzJS (A fork of nextjs which has built in sessions)
Supertokens stores session information client or serverside in a database https://supertokens.com/docs/emailpassword/common-customizations/sessions/new-session
Open source user management and identity server.