We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Authorization

While authentication is about verifying who a user is, authorization is about verifying what a user is allowed to do.

For example, a hypothetical YouTuber ThePrimeagen should be allowed to edit and delete the videos on his account, and everyone should be allowed to view them. Another absolutely-not-real YouTuber TEEJ should be able to view ThePrimeagen's videos, but not edit or delete them.

Authorization logic is just the code that enforces these kinds of rules.

Assignment

We already have a bit of authorization built into Chirpy: authenticated users can only create chirps for themselves, not for others.

    • An access token in the header
    • A new password and email in the request body

Run and submit the CLI tests.