Skip to content

Simple plugin to do OAuth2 authentication within PhoneGap/Cordova apps

Notifications You must be signed in to change notification settings

purplecabbage/phonegap-plugin-oauth2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phonegap-plugin-oauth2

Simple plugin to do OAuth2 authentication within PhoneGap/Cordova apps

Usage

document.addEventListener('deviceready', function() {
    var endUrl = "https://phonegap.com/authCallback";
    var startUrl = "http://github.com/login/oauth/authorize/";
    startUrl += "?client_id=89855411f5d2ab238ad2";
    startUrl += "&redirect_uri=" + endUrl;
    // scope
    // state
    // allow_signup

    PG_OAuth2.authenticate(function(url){
        setTimeout(function() {
            alert("Success " + url);
        },0)

    },
    function(err) {
        alert("error " + err);
    },
    startUrl,endUrl);
});

About

Simple plugin to do OAuth2 authentication within PhoneGap/Cordova apps

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published