You’re logged in… but still can’t access some features.�Why?
You’re logged in… but still can’t access some features.�Why? Because authentication and authorization are not the same thing.
Authentication means verifying who you are.
For example:�When you log in using email and password,
�the server checks your identity.
If correct, you are authenticated.
Now comes Authorization.
Authorization means verifying what you are allowed to access.
For example:�After logging in,�a normal user cannot access admin features.
Even though they are authenticated,�they are not authorized.
Here’s the simple flow:
Step 1: Authentication → verifies identity�Step 2: Authorization → verifies permissions
Authentication happens first.�Authorization happens after.
In APIs, authentication is done using:�JWT tokens�session IDs
Authorization checks:�roles�permissions�access rights
In simple words:�Authentication is ‘Who are you?�Authorization is ‘What can you access?
Comments
Comments from the original post on Instagram
No comments yet
