Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
235 changes: 191 additions & 44 deletions dist/ng-cordova-oauth.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/ng-cordova-oauth.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/oauth.500px.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
redirect_uri = options.redirect_uri;
}
}
var browserRef = window.cordova.InAppBrowser.open('https://api.500px.com/v1/api/js-sdk/authorize?sdk_key=' + sdkKey + '&callback=' + redirect_uri, '_blank', 'toolbar=no,zoom=no,location=no,clearsessioncache=yes,clearcache=yes');
var browserRef = window.cordova.InAppBrowser.open('https://api.500px.com/v1/api/js-sdk/authorize?sdk_key=' + sdkKey + '&callback=' + redirect_uri, '_blank', 'toolbar=no,zoom=no,location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES');
browserRef.addEventListener('loadstart', function(event) {
if((event.url).indexOf(redirect_uri) === 0) {
var accessToken = (event.url).split("#token:")[1].split(',')[0];
Expand Down
2 changes: 1 addition & 1 deletion src/oauth.adfs.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
var deferred = $q.defer();
if(window.cordova) {
if($cordovaOauthUtility.isInAppBrowserInstalled()) {
var browserRef = window.cordova.InAppBrowser.open(adfsServer + '/adfs/oauth2/authorize?response_type=code&client_id=' + clientId +'&redirect_uri=http://localhost/callback&resource=' + relyingPartyId, '_blank', 'location=no');
var browserRef = window.cordova.InAppBrowser.open(adfsServer + '/adfs/oauth2/authorize?response_type=code&client_id=' + clientId +'&redirect_uri=http://localhost/callback&resource=' + relyingPartyId, '_blank', 'location=no,allowinlinemediaplayback=YES');

browserRef.addEventListener("loadstart", function(event) {
if((event.url).indexOf('http://localhost/callback') === 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/oauth.azuread.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
if(window.cordova) {
if($cordovaOauthUtility.isInAppBrowserInstalled()) {

var browserRef = window.cordova.InAppBrowser.open('https://login.microsoftonline.com/' + tenantId + '/oauth2/authorize?response_type=code&client_id=' + clientId + '&redirect_uri=http://localhost/callback', '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');
var browserRef = window.cordova.InAppBrowser.open('https://login.microsoftonline.com/' + tenantId + '/oauth2/authorize?response_type=code&client_id=' + clientId + '&redirect_uri=http://localhost/callback', '_blank', 'location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES');
browserRef.addEventListener("loadstart", function(event) {
if((event.url).indexOf('http://localhost/callback') === 0) {
var requestToken = (event.url).split("code=")[1];
Expand Down
2 changes: 1 addition & 1 deletion src/oauth.box.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
redirect_uri = options.redirect_uri;
}
}
var browserRef = window.cordova.InAppBrowser.open('https://app.box.com/api/oauth2/authorize/?client_id=' + clientId + '&redirect_uri=' + redirect_uri + '&state=' + appState + '&response_type=code', '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');
var browserRef = window.cordova.InAppBrowser.open('https://app.box.com/api/oauth2/authorize/?client_id=' + clientId + '&redirect_uri=' + redirect_uri + '&state=' + appState + '&response_type=code', '_blank', 'location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES');
browserRef.addEventListener('loadstart', function(event) {
if((event.url).indexOf(redirect_uri) === 0) {
var requestToken = (event.url).split("code=")[1];
Expand Down
2 changes: 1 addition & 1 deletion src/oauth.digitalOcean.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
redirect_uri = options.redirect_uri;
}
}
var browserRef = window.cordova.InAppBrowser.open("https://cloud.digitalocean.com/v1/oauth/authorize?client_id=" + clientId + "&redirect_uri=" + redirect_uri + "&response_type=code&scope=read%20write", "_blank", "location=no,clearsessioncache=yes,clearcache=yes");
var browserRef = window.cordova.InAppBrowser.open("https://cloud.digitalocean.com/v1/oauth/authorize?client_id=" + clientId + "&redirect_uri=" + redirect_uri + "&response_type=code&scope=read%20write", "_blank", "location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES");
browserRef.addEventListener("loadstart", function(event) {
if((event.url).indexOf(redirect_uri) === 0) {
var requestToken = (event.url).split("code=")[1];
Expand Down
2 changes: 1 addition & 1 deletion src/oauth.dribble.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

var scope = appScope.join(",").replace(/,/g, '+'); //dribble scopes are passed with +
var browserRef = window.cordova.InAppBrowser.open(OAUTH_URL + '?client_id=' + clientId + '&redirect_uri=' + redirect_uri +
'&scope=' + scope + '&state=' + state, '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');
'&scope=' + scope + '&state=' + state, '_blank', 'location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES');
browserRef.addEventListener('loadstart', function (event) {
if ((event.url).indexOf(redirect_uri) === 0) {
var callBackCode = (event.url).split("code=")[1];
Expand Down
2 changes: 1 addition & 1 deletion src/oauth.dropbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
redirect_uri = options.redirect_uri;
}
}
var browserRef = window.cordova.InAppBrowser.open("https://www.dropbox.com/1/oauth2/authorize?client_id=" + appKey + "&redirect_uri=" + redirect_uri + "&response_type=token", "_blank", "location=no,clearsessioncache=yes,clearcache=yes");
var browserRef = window.cordova.InAppBrowser.open("https://www.dropbox.com/1/oauth2/authorize?client_id=" + appKey + "&redirect_uri=" + redirect_uri + "&response_type=token", "_blank", "location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES");
browserRef.addEventListener("loadstart", function(event) {
if ((event.url).indexOf(redirect_uri) === 0) {
browserRef.removeEventListener("exit",function(event){});
Expand Down
2 changes: 1 addition & 1 deletion src/oauth.envato.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
redirect_uri = options.redirect_uri;
}
}
var browserRef = window.cordova.InAppBrowser.open('https://api.envato.com/authorization?client_id=' + clientId + '&redirect_uri=' + redirect_uri + '&response_type=token', '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');
var browserRef = window.cordova.InAppBrowser.open('https://api.envato.com/authorization?client_id=' + clientId + '&redirect_uri=' + redirect_uri + '&response_type=token', '_blank', 'location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES');
browserRef.addEventListener('loadstart', function(event) {
if((event.url).indexOf(redirect_uri) === 0) {
browserRef.removeEventListener("exit",function(event){});
Expand Down
2 changes: 1 addition & 1 deletion src/oauth.facebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
if(options !== undefined && options.hasOwnProperty("auth_type")) {
flowUrl += "&auth_type=" + options.auth_type;
}
var browserRef = window.cordova.InAppBrowser.open(flowUrl, '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');
var browserRef = window.cordova.InAppBrowser.open(flowUrl, '_blank', 'location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES');
browserRef.addEventListener('loadstart', function(event) {
if((event.url).indexOf(redirect_uri) === 0) {
browserRef.removeEventListener("exit",function(event){});
Expand Down
2 changes: 1 addition & 1 deletion src/oauth.familySearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
redirect_uri = options.redirect_uri;
}
}
var browserRef = window.cordova.InAppBrowser.open("https://ident.familysearch.org/cis-web/oauth2/v3/authorization?client_id=" + clientId + "&redirect_uri=" + redirect_uri + "&response_type=code&state=" + state, "_blank", "location=no,clearsessioncache=yes,clearcache=yes");
var browserRef = window.cordova.InAppBrowser.open("https://ident.familysearch.org/cis-web/oauth2/v3/authorization?client_id=" + clientId + "&redirect_uri=" + redirect_uri + "&response_type=code&state=" + state, "_blank", "location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES");
browserRef.addEventListener("loadstart", function(event) {
if((event.url).indexOf(redirect_uri) === 0) {
var requestToken = (event.url).split("code=")[1];
Expand Down
2 changes: 1 addition & 1 deletion src/oauth.foursquare.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
redirect_uri = options.redirect_uri;
}
}
var browserRef = window.cordova.InAppBrowser.open('https://foursquare.com/oauth2/authenticate?client_id=' + clientId + '&redirect_uri=' + redirect_uri + '&response_type=token', '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');
var browserRef = window.cordova.InAppBrowser.open('https://foursquare.com/oauth2/authenticate?client_id=' + clientId + '&redirect_uri=' + redirect_uri + '&response_type=token', '_blank', 'location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES');
browserRef.addEventListener('loadstart', function (event) {
if ((event.url).indexOf(redirect_uri) === 0) {
browserRef.removeEventListener("exit",function(event){});
Expand Down
2 changes: 1 addition & 1 deletion src/oauth.github.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
redirect_uri = options.redirect_uri;
}
}
var browserRef = window.cordova.InAppBrowser.open('https://github.com/login/oauth/authorize?client_id=' + clientId + '&redirect_uri=' + redirect_uri + '&scope=' + appScope.join(","), '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');
var browserRef = window.cordova.InAppBrowser.open('https://github.com/login/oauth/authorize?client_id=' + clientId + '&redirect_uri=' + redirect_uri + '&scope=' + appScope.join(","), '_blank', 'location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES');
browserRef.addEventListener('loadstart', function(event) {
if((event.url).indexOf(redirect_uri) === 0) {
var requestToken = (event.url).split("code=")[1];
Expand Down
2 changes: 1 addition & 1 deletion src/oauth.google.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
redirect_uri = options.redirect_uri;
}
}
var browserRef = window.cordova.InAppBrowser.open('https://accounts.google.com/o/oauth2/auth?client_id=' + clientId + '&redirect_uri=' + redirect_uri + '&scope=' + appScope.join(" ") + '&approval_prompt=force&response_type=token id_token', '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');
var browserRef = window.cordova.InAppBrowser.open('https://accounts.google.com/o/oauth2/auth?client_id=' + clientId + '&redirect_uri=' + redirect_uri + '&scope=' + appScope.join(" ") + '&approval_prompt=force&response_type=token id_token', '_blank', 'location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES');
browserRef.addEventListener("loadstart", function(event) {
if((event.url).indexOf(redirect_uri) === 0) {
browserRef.removeEventListener("exit",function(event){});
Expand Down
2 changes: 1 addition & 1 deletion src/oauth.imgur.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
redirect_uri = options.redirect_uri;
}
}
var browserRef = window.cordova.InAppBrowser.open('https://api.imgur.com/oauth2/authorize?client_id=' + clientId + '&response_type=token', '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');
var browserRef = window.cordova.InAppBrowser.open('https://api.imgur.com/oauth2/authorize?client_id=' + clientId + '&response_type=token', '_blank', 'location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES');
browserRef.addEventListener('loadstart', function(event) {
if((event.url).indexOf(redirect_uri) === 0) {
browserRef.removeEventListener("exit",function(event){});
Expand Down
7 changes: 6 additions & 1 deletion src/oauth.instagram.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@
scope = '&scope' + appScope.join('+');
}

var browserRef = window.cordova.InAppBrowser.open('https://api.instagram.com/oauth/authorize/?client_id=' + clientId + '&redirect_uri=' + redirect_uri + scope + '&response_type='+response_type, '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');
var browserRef = window.cordova.InAppBrowser.open(
'https://api.instagram.com/oauth/authorize/?client_id=' + clientId + '&redirect_uri=' + redirect_uri + scope + '&response_type='+response_type,
'_blank',
'location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES'
);

browserRef.addEventListener('loadstart', function(event) {
if((event.url).indexOf(redirect_uri) === 0) {
browserRef.removeEventListener("exit",function(event){});
Expand Down
7 changes: 6 additions & 1 deletion src/oauth.jawbone.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@
redirect_uri = options.redirect_uri;
}
}
var browserRef = window.cordova.InAppBrowser.open('https://jawbone.com/auth/oauth2/auth?client_id=' + clientId + '&redirect_uri=' + redirect_uri + '&response_type=code&scope=' + appScope.join(" "), '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');

var browserRef = window.cordova.InAppBrowser.open(
'https://jawbone.com/auth/oauth2/auth?client_id=' + clientId + '&redirect_uri=' + redirect_uri + '&response_type=code&scope=' + appScope.join(" "),
'_blank',
'location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES'
);

browserRef.addEventListener('loadstart', function(event) {
if((event.url).indexOf(redirect_uri) === 0) {
Expand Down
7 changes: 6 additions & 1 deletion src/oauth.linkedin.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@
redirect_uri = options.redirect_uri;
}
}
var browserRef = window.cordova.InAppBrowser.open('https://www.linkedin.com/uas/oauth2/authorization?client_id=' + clientId + '&redirect_uri=' + redirect_uri + '&scope=' + appScope.join(" ") + '&response_type=code&state=' + state, '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');
var browserRef = window.cordova.InAppBrowser.open(
'https://www.linkedin.com/uas/oauth2/authorization?client_id=' + clientId + '&redirect_uri=' + redirect_uri + '&scope=' + appScope.join(" ") + '&response_type=code&state=' + state,
'_blank',
'location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES'
);

browserRef.addEventListener('loadstart', function(event) {
if((event.url).indexOf(redirect_uri) === 0) {
try {
Expand Down
7 changes: 6 additions & 1 deletion src/oauth.magento.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@
}

var tokenSecret = parameterMap.oauth_token_secret;
var browserRef = window.cordova.InAppBrowser.open(baseUrl + '/oauth/authorize?oauth_token=' + parameterMap.oauth_token, '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');

var browserRef = window.cordova.InAppBrowser.open(
baseUrl + '/oauth/authorize?oauth_token=' + parameterMap.oauth_token,
'_blank',
'location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES'
);

browserRef.addEventListener('loadstart', function(event) {
if ((event.url).indexOf("http://localhost/callback") === 0) {
Expand Down
8 changes: 7 additions & 1 deletion src/oauth.meetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@
redirect_uri = options.redirect_uri;
}
}
var browserRef = window.cordova.InAppBrowser.open('https://secure.meetup.com/oauth2/authorize/?client_id=' + clientId + '&redirect_uri=' + redirect_uri + '&response_type=token', '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');

var browserRef = window.cordova.InAppBrowser.open(
'https://secure.meetup.com/oauth2/authorize/?client_id=' + clientId + '&redirect_uri=' + redirect_uri + '&response_type=token',
'_blank',
'location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES'
);

browserRef.addEventListener('loadstart', function(event) {
if((event.url).indexOf(redirect_uri) === 0) {
browserRef.removeEventListener("exit",function(event){});
Expand Down
8 changes: 7 additions & 1 deletion src/oauth.mercadolibre.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@
redirect_uri = options.redirect_uri;
}
}
var browserRef = window.cordova.InAppBrowser.open("http://auth.mercadolibre.com.ar/authorization?client_id=" + appId + "&redirect_uri=" + redirect_uri + "&response_type=token", "_blank", "location=no,clearsessioncache=yes,clearcache=yes");

var browserRef = window.cordova.InAppBrowser.open(
"http://auth.mercadolibre.com.ar/authorization?client_id=" + appId + "&redirect_uri=" + redirect_uri + "&response_type=token",
"_blank",
"location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES"
);

browserRef.addEventListener("loadstart", function(event) {
if ((event.url).indexOf(redirect_uri) === 0) {
browserRef.removeEventListener("exit",function(event){});
Expand Down
2 changes: 1 addition & 1 deletion src/oauth.netatmo.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
var clientSecret = (options.clientSecret)? options.clientSecret: null;
var appScope = (options.appScope)? options.appScope: null;
var state = (options.state)? options.state: Math.random().toString(36).substr(2, 5);
var inappbrowserOptions = (options.inappbrowserOptions)? options.inappbrowserOptions: 'location=no,clearsessioncache=yes,clearcache=yes';
var inappbrowserOptions = (options.inappbrowserOptions)? options.inappbrowserOptions: 'location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES';

if(window.cordova) {
if($cordovaOauthUtility.isInAppBrowserInstalled()) {
Expand Down
8 changes: 7 additions & 1 deletion src/oauth.odnoklassniki.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@
var deferred = $q.defer();
if (window.cordova) {
if ($cordovaOauthUtility.isInAppBrowserInstalled()) {
var browserRef = window.cordova.InAppBrowser.open('http://www.odnoklassniki.ru/oauth/authorize?client_id=' + clientId + '&scope=' + appScope.join(",") + '&response_type=token&redirect_uri=http://localhost/callback' + '&layout=m', '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');

var browserRef = window.cordova.InAppBrowser.open(
'http://www.odnoklassniki.ru/oauth/authorize?client_id=' + clientId + '&scope=' + appScope.join(",") + '&response_type=token&redirect_uri=http://localhost/callback' + '&layout=m',
'_blank',
'location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES'
);

browserRef.addEventListener('loadstart', function (event) {
if ((event.url).indexOf("http://localhost/callback") === 0) {
var callbackResponse = (event.url).split("#")[1];
Expand Down
8 changes: 7 additions & 1 deletion src/oauth.pocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@
})
.success(function(data) {
var code = data.split("code=")[1];
var browserRef = window.cordova.InAppBrowser.open('https://getpocket.com/auth/authorize?request_token=' + code + '&redirect_uri=' + redirect_url, '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');

var browserRef = window.cordova.InAppBrowser.open(
'https://getpocket.com/auth/authorize?request_token=' + code + '&redirect_uri=' + redirect_url,
'_blank',
'location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES'
);

browserRef.addEventListener('loadstart', function(event) {
if((event.url).indexOf(redirect_url) === 0) {
browserRef.removeEventListener("exit",function(event){});
Expand Down
8 changes: 7 additions & 1 deletion src/oauth.rally.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@
redirect_uri = options.redirect_uri;
}
}
var browserRef = window.cordova.InAppBrowser.open('https://rally1.rallydev.com/login/oauth2/auth?client_id=' + clientId + '&redirect_uri=' + redirect_uri + '&scope=' + appScope + '&response_type=code', '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');

var browserRef = window.cordova.InAppBrowser.open(
'https://rally1.rallydev.com/login/oauth2/auth?client_id=' + clientId + '&redirect_uri=' + redirect_uri + '&scope=' + appScope + '&response_type=code',
'_blank',
'location=no,clearsessioncache=yes,clearcache=yes,allowinlinemediaplayback=YES'
);

browserRef.addEventListener('loadstart', function(event) {
if((event.url).indexOf("http://localhost/callback") === 0) {
var requestToken = (event.url).split("code=")[1];
Expand Down
Loading