jasonwatmore.com/next-js-13-app-router-mongodb-user-rego-and-login-tutorial-with-example
1 Users
0 Comments
58 Highlights
0 Notes
Tags
Top Highlights
MongoDB and Mongoose ODM
Next.js Tutorial Front-End App
Next.js Tutorial Back-End API
- public page for logging into the Next.js app.
- public page for registering a new user account with the app.
- secure home page containing a simple welcome message to the logged in user.
- secure page displaying a list of all users in the Next.js app, with options to add, edit or delete users.
- secure page for adding a new user.
- secure page for editing an existing user.
Secure pages are protected by the Secure Layout Component which redirects unauthenticated users to the login page.
- POST - public route for authenticating username and password and generating a JWT token that is returned in an HTTP only
cookie.
- POST - public route for logging out that deletes the HTTP only
- POST - public route for registering a new user with the Next.js app.
- GET - secure route that returns all users.
- POST - secure route for creating a new user.
- GET - secure route that returns the current logged in user.
- GET - secure route that returns the user with the specified
- PUT - secure route for updating a user.
- DELETE - secure route for deleting a user.
Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.