Authentication and authorization terms are often used interchangeably by many, but they are two completely different concepts. Both are crucial in ensuring the security of resources in any application or system. Businesses should efficiently configure both authentication and authorization in their application to ensure the utmost security.
Authentication
- Verifies the identity of a user or device
- Works based on passwords, OTPs, biometrics, security questions, etc.
- Takes place at the beginning of a session
- It is the first step in ensuring security, and it is essential for maintaining the integrity of an application
- Data generally moves through ID tokens
- Parts of authentication process is visible to users
- Users can change their authentication credentials
- Example: Consider the example of an Employee Portal in any organization. All employees of an organization can access this portal after providing their credentials
Authorization
- Grants or denies access to specific resources based on that verified identity
- Works based on assigned roles or permissions by admin or security user
- Takes place throughout the session as the user attempts to access different resources
- It is the second step, and it is essential for maintaining the confidentiality of an application
- Data generally moves through access tokens
- Entire authorization process takes place in the background
- Users can’t change their access level
- Example: For the same Employee Portal, the access levels of all employees are different depending on their roles, i.e., general employee, managers, account team, HR team, etc. For example, the HR team can see the personal information of all employees, the account team can access details of taxation of all employees, managers can see the basic information of their subordinates, and those subordinates can only access and view their own details.
Read the full blog in detail here: https://mojoauth.com/blog/authentication-vs-authorization/
Please comment down below what would you prefer for your organization Authentication or Authorization ???
good write-up. this is why i don't like frameworks for entry-level devs. typically the framework will handle all those aspects behind the scenes using some sort of magical methods, thus not exposing the actual concepts except for those who dive deep.
Great.
In summary what I understand from this post is that Authentication is the process of verifying someone's identity, while authorization is the process of verifying someone's access to certain resources.