Web security using OAuth 2.0

Most people think they understand OAuth, unfortunately, OAuth is not a password sharing mechanism or protocol, is not even a way to establish user identity. The misunderstanding comes down to authentication vs authorization, these are known as Authentication(AuthN) vs. Authorization(AuthZ).

  • AuthN is Who are you? (Accomplish by the login process)
  • AuthZ is What can you do? (Depends on authentication)

So to be clear OAuth is a framework for sharing authorization. In fact if you dig deep into specification you’ll find that doesn’t address authentication at all instead OAuth is framework that you can plug additonal components into.

It’s effectively process that says I don’t know who you are but I trust other provider, like facebook that it’ll tell what you allow to do.

For Example when you check in into a flight, you reach to the counter the counter personal ask’s you for your ID and your ticket, the ID plays a role in identifying you whereas the booking details let the system know about what sort of seat you paid for and other added features that you opt for like access to waiting lounge or priority pass. The airline then print your hard copy ticket via which you can now access those resources without having to present ID and booking information for every service. The advantange here is that your identity and information never leaves the check-in counter provides security and privacy, this is fundamentally how OAuth works.

So scenarios where you use services like spotify by login in your facebook account, you don’t provide your facebook password to spotify and but still consume it’s streaming services. This kind of privacy and security with regarding to user identity is highly required in the regulated sectors like banking, insurance etc.