DEV Community

NJOKU SAMSON EBERE
NJOKU SAMSON EBERE

Posted on • Updated on

Differentiating Authorization from Authentication

Authentication and Authorization are 2 confusing terms in the world of tech. It is not difficult to use them interchangeably when you do not understand their meanings. This is a very common problem.

In this tutorial, I will be teaching you the difference between these terms using a real life scenario. Let's get to it.

Real Life Scenario

Scenario

Imagine that you are visiting a house and you knock or ring the door bell.

Someone comes and open the door, seeing that you are someone they know, they let you in (i.e. authentication)

But While in the house, you can only seat on the floor and no where else (i.e. authorization)

Other Explanations

  1. You can login to an App (i.e. authentication) but you can access only the features of a “user” because you are not “authorized” to use other features.

  2. Authentication tells that you are an approved user of an app while Authorization tells if you can use a particular feature.

Demonstrating Authentication

I have shown how Authentication can be achieved using nodejs and mongoDB in my series entitled: "Authentication with Nodejs and mongoDB". Check them out below:

  1. Part 1
  2. Part 2
  3. Part 3
  4. Part 4

Conclusion

We have so far seen that even though these terms are related, they are indeed different. I hope it makes sense now. I will be making a code example of authorization in the future hopefully.

Meanwhile, see you around.

Top comments (0)