What is OAuth (Open Authorization) ?
OAuth (Open Authorization) is an open standard protocol for authorization of an application for using user information, in general, it allows a third party application access to user related info like name, DOB, email or other required data from an application like Facebook, Google etc. without giving the third party app the user password. It is pronounced as oh-auth.
You might have seen a “login with Google” or “login with Facebook” button on the login/signup page of a website that makes easier to get using the service or website by simply logging into one of the services and grant the client application permission to access your data without giving Password. This is done with the OAuth.

It is designed to work with HTTP(Hyper Text Transfer Protocol) and it allows access tokens to be issued to the third party application by an authorization server with the approval from the owner.
There are 3 Components in OAuth Mechanism–
- OAuth Provider – This is the OAuth provider Eg. Google, FaceBook etc.
- OAuth Client – This is the website where we are sharing or authenticating the usage of our information. Eg. GeeksforGeeks etc.
- Owner – The user whose login authenticates sharing of information.
OAuth can be implemented via google console for “Login/Sign Up with Google” on a web app.
Pattern to be Followed –
- Get OAuth 2.0 Client ID from Google API Console
- Next, Obtain an access token from the Google Authorization Server to access the API.
- Send the request with the access token to an API .
- Get Refresh token if longer access is required.
Recommended Posts:
- What does '<?=' short open tag mean in PHP ?
- How to Open URL in New Tab using JavaScript ?
- How to open a PDF files in web browser using PHP?
- HTML | DOM open() Method
- HTML | open Attribute
- AngularJS | ng-open Directive
- HTML | <details> open Attribute
- HTML | DOM Details open Property
- HTML | dialog open Attribute
- PHP | fopen( ) (Function open file or URL)
- Open a link without clicking on it using JavaScript
- How to accordion scroll to top to open content in Bootstrap ?
- How to open dropdown menu on hover in Bootstrap ?
- Python script to open a Google Map location on clipboard
- Step Wise Guide to start with Open Source
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



