Register Identity Provider For New OAuth Application

Introduction

OAuth is a web authentication protocol and open standard for authorization. Nowadays, Internet users use it to log in to third party websites using the following accounts without exposing their user registration.

  1. GOOGLE
  2. FACEBOOK
  3. TWITTER
  4. MICROSOFT
  5. LINKEDIN
  6. GITHUB
  7. FLICKER
  8. YAHOO
  9. DROPBOX

You can find this wiki for some more notable identity providers.

How OAuth Works

Third party app /website can access your data stored in another website without registries. The OAuth flow has three steps:

  • Get a Request Token.
  • Get the User's Authorization.
  • Exchange the Request Token for an Access Token.

    Request

Register New OAuth Applications

Before you can integrate Identity provider, sign-in into your apps. You must register your application and get the corresponding client ID and client secret from the below steps which we need to call the Sign-in API:

Register

Configure Google OAuth

Register new OAuth application by following these steps,

  1. Navigate to https://console.developers.google.com and login with your Google account credentials when prompted.
  2. Select Credentials tab and click on Create Project.
  3. Add your App/website name and click on Create.

    Add

  4. In the Credentials API popup, select the create credentials drop-down list, and choose OAuth client ID.

    Credentials API Popup

  5. Select Application Type as Web Application or iOS, Android and click on Configure button.

    Application Type

  6. Fill personal details, privacy details, and click on Save.
  7. Get the package name from your AndroidManifest.xml file. Then, use the following command to get the fingerprints and click on Create.

    command

  8. From the resulting OAuth client dialog box, copy the Client ID. The Client ID lets your app access the enabled Google APIs.

Configure Facebook OAuth

Register new OAuth application and follow the below steps,

application

  1. Navigate to https://developers.facebook.com and login with your Facebook account credentials when prompted.
  2. Click on “ My Apps” dropdown and select “Add a New App”.

    My Apps

  3. Select an App Platform ( iOS,Android,Facebook Canvas,WebSite,etc)
  4. Give Unique App/Website Name

    Unique App/Website Name

  5. Fill email, select app category and click on “Create APP ID”.
  6. Complete security check and click on Submit.
  7. Get the package name from your AndroidManifest.xml file, then add package name and class name.

    package

  8. Generate development key hash and press on Finish.

    development key hash

  9. From the resulting OAuth client dialog box, copy the Client ID. The Client ID lets your app access the enabled Facebook APIs.

Configure Twitter OAuth

Register new OAuth application and follow below steps:

  1. Navigate to https://dev.twitter.com/apps/new and login with your Twitter account credentials when prompted.
  2. Enter your Application Name, Description, your website address and callback URL.

    Application

  3. Accept the Developer agreement and click "Create your Twitter Application".
  4. Copy the consumer key (API key) and consumer secret from the screen and use into your application.

    consumer key

Configure Microsoft OAuth

  1. Go to https://apps.dev.microsoft.com/, and login with your Microsoft account (Hotmail, Windows Live, Messenger, Active Directory, Xbox, Skype, and OneDrive) credentials when prompted.
  2. Select My Application and click Add an App.
  3. Enter the application name and click on Create application.

    Application

  4. Generate application ID and secrets and use into the application.

    Application

Configure LinkedIn OAuth

Register new OAuth application; follow below steps,

  1. Navigate to http://developer.linkedin.com/ and login with your LinkedIn account credentials when prompted
  2. Select platform (RESTAPI,Javascript ,Android SDK,iOS SDK).
  3. Click the "Add New Application" link and fill in the required fields (Company Name, Application Name, Description, Application URL, logo, Business website, email, and phone) and agree the License condition.

    Add New Application

  4. Click on Submit. To retrieve your API Key and Secret Key later, click on the link for your Application Name and they will now be listed in the application's details.

    Submit

Configure Github OAuth

Register new OAuth application and follow the below steps:

  1. Navigate to https://github.com/settings/developers and login with your Github account credentials when prompted.
  2. Click the "Register New App" link and fill in the required fields (Application Name, Description, URL and callback URL) and click on”Regsiter Application “

    Register

  3. Copy the Client ID and Client Secret from the screen and use into your application.

    application

Configure Dropbox OAuth

  1. Navigate to https://www.dropbox.com/developers and login with your DropBox account credentials when prompted.
  2. Choose an API Type and Access type.
  3. Enter the Application name and click on Create App.

    Create App

  4. Copy the App Key and App Secret from the screen and use into your application,

    application

Configure Flicker OAuth

  1. Navigate to https://developer.yahoo.com/flickr/ and login with your Yahoo account credentials when prompted.
  2. For getting API Key, click on “ Create an APP”.

    Create an APP

  3. Choose if Non-Commercial or Commercial.
  4. Enter the Application name, description and click on Submit.

    submit

  5. Copy the App Key and App Secret from the screen and use into your application.

    application

Configure Yahoo OAuth

  1. Navigate to https://developer.yahoo.com/apps/ and login with your Yahoo account credentials when prompted.
  2. Enter the application name, application type and access and click on Create App.



    Create App

  3. Copy the Client ID and Client Secret from the screen and use into your application.

    application

I have explained the Xamarin oAuth Implementation here.


Similar Articles