Implementing Open
Authentication in your App
     OAuth2.0 / Individual OAuth Service
   [Office's Weekly Session] @ WNeeds.com
Why need open authentication?

● This process will give a life to users who come on your app
  but don't want to see a large size registration form
● Every user will try your app by simply doing the one click
  registration/login 
● Thus It will give a large number of users to your
  application
● Your app will be social on internet via these users
  permissions
● This is smart and modern at a glance
How it can be done?

Using OAuth2.0                     Using lib/class of
                                   individual web
 ● Very easy to use in your app    services
 ● Supports major social
   network's authentication
   flow                             ● Using twitteroauth for
 ● facebook, Google, LinkedIn,        implementing
   Windows Live ...                   [authentication by
 ● Doesn't supports                   twiiter]
   Twitter: https://dev.twitter.    ●  Any other web service's
  com/discussions/397
                                      API
Standard work flow of any of these

 
Three different steps:

     user authentication
     User authentication ensures that the user is who they say they are
    app authorization
    App authorization ensures that the user knows exactly what data and   
     capabilities they are providing to your app
    Need: app_id, redirect_uri
    app authentication
    App authentication ensures that the user is giving their information to 
      your
      app and not someone else
      Need: authorization_code, app_secret, redirect_uri
For knowing about OAuth2.0
http://hueniverse.com/2010/05/introducing-oauth-2-0/
Authentication Using OAuth2.0
1. Download OAuth2.0 from here: http://raynux.
com/ray/labs/projects/oauth2.zip

2. Configure [config.php] according to services you want to
implement in your app for authentication
  OAuth2Consumer::getInstance('Facebook', array(
   'client_id' => '...........',
   'client_secret' => '...........',
3. Use the authorization method in any link/button any where
  OAuth2Consumer::getInstance('Facebook')
         ->authorize();
4. Use any method for example grabbing access token, 
        $oauth = OAuth2Consumer::getInstance('Facebook');
        $accessToken = $oauth->getAccessToken();
       Or getting  user data etc
     $friends = $oauth->api('me/friendlists');
Using API of Individual                     WebSr Ex basic auth by twitter
1. To get/create [consumer key], [consumer secret] and for
basic app URL setup go here: https://dev.twitter.com/apps

2. Get [twitteroauth.php] and [OAuth.php] by downloading
twitter recommended example for PHP app from here: https:
//github.com/abraham/twitteroauth/ 

3. To Get [oauth_token], [oauth_token_secret]
    $twitteroauth = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);
    $request_token = $twitteroauth
            ->getRequestToken('TWITTER_CALLBACK_URL');
4. Then to get [access_token] using [oauth_verifier]
    $twitteroauth = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET,
                        [oauth_token], [oauth_token_secret]);
    $access_token = $twitteroauth->getAccessToken($_GET['oauth_verifier']);
continue ...

5. For getting user data:
    $userInfo = $twitteroauth->get('account/verify_credentials');
Lets Discuss

More Related Content

PPTX
A simple PHP LinkedIn OAuth 2.0 example
PPT
Linkedin & OAuth
PDF
OAuth2 and LinkedIn
PDF
Spring4 security oauth2
PPTX
PayPal Identity Services - Innovate 2010
PPT
OAuth2 Protocol with Grails Spring Security
PPTX
PPTX
Microsoft identity manoj mittal
A simple PHP LinkedIn OAuth 2.0 example
Linkedin & OAuth
OAuth2 and LinkedIn
Spring4 security oauth2
PayPal Identity Services - Innovate 2010
OAuth2 Protocol with Grails Spring Security
Microsoft identity manoj mittal

Viewers also liked (6)

PPT
Prueba 1
PPT
Univision radio;
DOC
Regional Mexican - 27 sts
KEY
Final Presentation
PPSX
Reti D\'Imprese
Prueba 1
Univision radio;
Regional Mexican - 27 sts
Final Presentation
Reti D\'Imprese
Ad

Similar to Implementing open authentication_in_your_app (20)

PDF
Stateless Auth using OAuth2 & JWT
PDF
Stateless Auth using OAUTH2 & JWT
PPTX
Oauth 2.0 Introduction and Flows with MuleSoft
PPTX
Introduction to OAuth and how to create it by JoeSelian
PPTX
Introduction to OAuth2
KEY
OAuth Android Göteborg
PPTX
#2 connected apps_calicut_31_july
PPTX
OAuth with Salesforce - Demystified
PDF
1000 ways to die in mobile oauth
PPTX
SSO with Social Login Integration & FastAPI Simplified
PPTX
Intro to OAuth2 and OpenID Connect
PPTX
OAuth in the Wild
PPTX
MuleSoft_Meetup__Official__updated_Sep_2020_ (1) (1).pptx
PDF
OAuth 2.0 and OpenID Connect
PDF
The Many Flavors of OAuth - Understand Everything About OAuth2
PPTX
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
PDF
APIdays Paris 2018 - Learning the OAuth Dance (Without Stepping on Anyone's T...
PPTX
OAuth
PPTX
Oauth2 and OWSM OAuth2 support
PPTX
Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Stateless Auth using OAuth2 & JWT
Stateless Auth using OAUTH2 & JWT
Oauth 2.0 Introduction and Flows with MuleSoft
Introduction to OAuth and how to create it by JoeSelian
Introduction to OAuth2
OAuth Android Göteborg
#2 connected apps_calicut_31_july
OAuth with Salesforce - Demystified
1000 ways to die in mobile oauth
SSO with Social Login Integration & FastAPI Simplified
Intro to OAuth2 and OpenID Connect
OAuth in the Wild
MuleSoft_Meetup__Official__updated_Sep_2020_ (1) (1).pptx
OAuth 2.0 and OpenID Connect
The Many Flavors of OAuth - Understand Everything About OAuth2
Using ArcGIS with OAuth 2.0 - Esri DevSummit Dubai 2013
APIdays Paris 2018 - Learning the OAuth Dance (Without Stepping on Anyone's T...
OAuth
Oauth2 and OWSM OAuth2 support
Microservice security with spring security 5.1,Oauth 2.0 and open id connect
Ad

Recently uploaded (20)

PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
Flame analysis and combustion estimation using large language and vision assi...
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PDF
Comparative analysis of machine learning models for fake news detection in so...
PPTX
TEXTILE technology diploma scope and career opportunities
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PPTX
Training Program for knowledge in solar cell and solar industry
PDF
Five Habits of High-Impact Board Members
DOCX
search engine optimization ppt fir known well about this
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Custom Battery Pack Design Considerations for Performance and Safety
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
Improvisation in detection of pomegranate leaf disease using transfer learni...
Early detection and classification of bone marrow changes in lumbar vertebrae...
NewMind AI Weekly Chronicles – August ’25 Week IV
Taming the Chaos: How to Turn Unstructured Data into Decisions
Flame analysis and combustion estimation using large language and vision assi...
Consumable AI The What, Why & How for Small Teams.pdf
Comparative analysis of machine learning models for fake news detection in so...
TEXTILE technology diploma scope and career opportunities
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
OpenACC and Open Hackathons Monthly Highlights July 2025
Training Program for knowledge in solar cell and solar industry
Five Habits of High-Impact Board Members
search engine optimization ppt fir known well about this
sustainability-14-14877-v2.pddhzftheheeeee
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
The influence of sentiment analysis in enhancing early warning system model f...
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf

Implementing open authentication_in_your_app

  • 1. Implementing Open Authentication in your App OAuth2.0 / Individual OAuth Service [Office's Weekly Session] @ WNeeds.com
  • 2. Why need open authentication? ● This process will give a life to users who come on your app but don't want to see a large size registration form ● Every user will try your app by simply doing the one click registration/login  ● Thus It will give a large number of users to your application ● Your app will be social on internet via these users permissions ● This is smart and modern at a glance
  • 3. How it can be done? Using OAuth2.0 Using lib/class of individual web ● Very easy to use in your app services ● Supports major social network's authentication flow ● Using twitteroauth for ● facebook, Google, LinkedIn, implementing Windows Live ... [authentication by ● Doesn't supports twiiter] Twitter: https://dev.twitter. ●  Any other web service's com/discussions/397 API
  • 4. Standard work flow of any of these  
  • 5. Three different steps:    user authentication      User authentication ensures that the user is who they say they are     app authorization     App authorization ensures that the user knows exactly what data and         capabilities they are providing to your app     Need: app_id, redirect_uri     app authentication     App authentication ensures that the user is giving their information to        your       app and not someone else       Need: authorization_code, app_secret, redirect_uri
  • 6. For knowing about OAuth2.0 http://hueniverse.com/2010/05/introducing-oauth-2-0/
  • 7. Authentication Using OAuth2.0 1. Download OAuth2.0 from here: http://raynux. com/ray/labs/projects/oauth2.zip 2. Configure [config.php] according to services you want to implement in your app for authentication OAuth2Consumer::getInstance('Facebook', array( 'client_id' => '...........', 'client_secret' => '...........', 3. Use the authorization method in any link/button any where OAuth2Consumer::getInstance('Facebook') ->authorize(); 4. Use any method for example grabbing access token,          $oauth = OAuth2Consumer::getInstance('Facebook'); $accessToken = $oauth->getAccessToken();        Or getting  user data etc $friends = $oauth->api('me/friendlists');
  • 8. Using API of Individual WebSr Ex basic auth by twitter 1. To get/create [consumer key], [consumer secret] and for basic app URL setup go here: https://dev.twitter.com/apps 2. Get [twitteroauth.php] and [OAuth.php] by downloading twitter recommended example for PHP app from here: https: //github.com/abraham/twitteroauth/  3. To Get [oauth_token], [oauth_token_secret]     $twitteroauth = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);     $request_token = $twitteroauth             ->getRequestToken('TWITTER_CALLBACK_URL'); 4. Then to get [access_token] using [oauth_verifier]     $twitteroauth = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET,                         [oauth_token], [oauth_token_secret]);     $access_token = $twitteroauth->getAccessToken($_GET['oauth_verifier']);
  • 9. continue ... 5. For getting user data:     $userInfo = $twitteroauth->get('account/verify_credentials');