Posts

Showing posts from October, 2018

Viewing Github profile using OAuth in Java

Image
Hello everyone! I have discussed the basics of OAuth and its components in the previous post. Let's see how to develop a simple java application to view your Github profile details using OAuth. We need to have a Github account in order to build this application.  Connect your application to Github Add a new application In your Github account, go to settings and select Developer settings. Click on New OAuth app. Register your new application Provide your application name, homepage URL and callback URL in the relevant fields and click Register application. Get your Client ID and Client Secret key Copy your Client ID and Client Secret and select update application Build the application Now, let's build the Java application. The main flow is as follows User will click on Auth login link Github Auth server will show permission screen to the user Once the user accepts to the scope, it will send the code to App Server ( Redirect URI) Once ...

Digging deeper into OAuth

Image
There are so many web applications in today’s world. Most of the applications require to create an account in order to use it. Creating an account seems to be a huge process where we have to fill up a lengthy form and provide a unique username. Also, we need to remember the credentials whenever we need to log in. So, how can we overcome these difficulties? With the use of OAuth, we can use social media login to sign up or sign in to an account.  What is OAuth? It is a framework for delegated authorization. It allows third-party applications to access protected user resources on behalf of the user. OAuth works over HTTPS and authorizes devices, APIs, servers, and applications with access tokens rather than credentials. There are two versions of OAuth: OAuth 1.0a and OAuth 2.0. The most widely used form of OAuth is OAuth 2.0.  When we are creating a new account in a web application, we might come across with a similar below image asking for permission to use the da...