Authentication with the Token
Limit the users' access to their own profiles so the users can only change their own profiles.
We'll cover the following...
We'll cover the following...
Authorization plays a vital role in constructing applications because it helps define what the user can do. We have a route to update the user, but there is a problem; anyone can update any user.
This section will implement a method that will require the user to be logged in to prevent unauthorized access.
We can do this by updating our users_controller.rb
file to refuse access to specific ...