#Best Practice Authentication (Username-Password)

1 messages · Page 1 of 1 (latest)

keen notch
#

Best Practice Authentication (Username-Password)

tough sail
#

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

Learn about authentication patterns in Next.js apps and explore a few examples.

Authentication for Next.js

Add simple email and password sign up functionality to your site or app in 15 minutes

Auth0

Rapidly integrate authentication and authorization for web, mobile, and legacy applications so you can focus on your core business.