The current third party apps revolution led to the scenario where apps need to access user’s private data from different websites. In order to access user’s data from other sites (especially personal data) , we have to go through a basic authentication mechanism. Many of them follows OAuth. You can read more about OAuth from here.
Here am just sharing a diagrammatic representation of how we are establishing a secure connection with a distant website using OAuth. My intention is to give an high level overview of OAuth mechanism.
1) Initially we will send a get request to the url from where you intend to get data and you will provide some information such as our application id, scope of data access ( r/w permission for different data sets, eg read_products, write_tweet), and redirect_uri(url to redirect after authentication) for authentication purpose.