Skip to content

Extending the Todo List Application to allow user authentication

Notifications You must be signed in to change notification settings

wdi-sg/users-todo-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Users Todo List

This is Part 6 of a series of labs working towards building your first full stack web app.

So far you've built a full MVC Todo List Application. The only thing that is missing is User Authentication. Use what you'ver learnt in the lab to add user authentication to this App.

Exercise

Part 1

You'll need to add user accounts and authentication routes to your application. Specifically, your Application should allow a user to:

  • signup and create a new account
  • login with their email and password
  • logout when they have finished their session
  • only CRUD Todos if they are logged in

Part 2

Now that you have user accounts, you want to associate the users with the Todos they create and use that to restrict access. Specifically, your Application should allow a user to:

  • create a new Todo - the todo should store the user_id of it's creator (Mongoose Referencing)
  • view only their Todos
  • edit only their Todos
  • delete only their Todos

Your Application should not allow a user to:

  • perform CRUD actions on the Todos of other users

Your new routes will include.

  • GET /auth/signup
  • POST /auth/signup
  • GET /auth/login
  • POST /auth/login
  • GET /auth/logout

As you'll have the logged in user stored in the req.body, you do not need to have the user id in the URL. For example /todos should show the Todos for the logged in user, whoever that is.

Bonus:

  • Add a navigation bar that shows the name/email of the logged in user and shows buttons to login/logout/signup.
  • Allow a user to transfer ownership of a Todo to another user. This would be an option on your edit form.
  • List some stats about you application on the public home page, number of users, number of Todos etc.
  • Allow a user to delete their account, which should then delete all of their Todos.

About

Extending the Todo List Application to allow user authentication

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published