Skip to content
WebDev Path
Back

Week 19: Authentication and authorization

Next video

Free lesson by Fireship on YouTube

About this lesson

Module:
Backend and databases
Time:
about 11 hours
Video:
2 min

Let users sign up and log in, and make sure they only see their own data.

By the end of this week you can

  • Explain sessions vs JWT
  • Hash passwords and never store them in plain text
  • Protect routes and data per user

Learn

  • Sessions and cookies
  • Password hashing
  • Auth libraries: Auth.js or Clerk
  • Authorization: checking ownership on every request

Read or watch

Practice

  1. Sign up, log in, log out
  2. Try to read another user's data and make sure it fails

Build

Add accounts to your app.

Check your understanding

Score 4 out of 5 to complete this week.

  1. 1. What is the difference between authentication and authorization?
  2. 2. How should passwords be stored?
  3. 3. Which cookie flag stops JavaScript from reading a session cookie?
  4. 4. What is OAuth used for in "Sign in with GitHub"?
  5. 5. Where must permission checks happen?
0 of 5 answered