Skip to content

Commit

Permalink
add rerequest option to facebook. update change log and prepare for n…
Browse files Browse the repository at this point in the history
…ext version
  • Loading branch information
nraboy committed Jun 28, 2015
1 parent 69243cf commit 8cf5949
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
0.1.4 -
0.1.4 - June 28, 2015

* Add Envato support
* Add optional `options` parameter to more providers
* Add optional re-request for permissions to Facebook provider

0.1.3 - June 7, 2015

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

# ngCordovaOauth

ngCordovaOauth is an AngularJS Apache Cordova Oauth library. The purpose of this library is to
quickly and easily obtain an access token from various web services to use their APIs.
ngCordovaOauth is an AngularJS Apache Cordova Oauth library. The purpose of this library is to quickly and easily obtain an access token from various web services to use their APIs.


## Requirements
Expand Down
6 changes: 5 additions & 1 deletion dist/ng-cordova-oauth.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,11 @@ angular.module("oauth.providers", ["oauth.utils"])
redirect_uri = options.redirect_uri;
}
}
var browserRef = window.open('https://www.facebook.com/v2.0/dialog/oauth?client_id=' + clientId + '&redirect_uri=' + redirect_uri + '&response_type=token&scope=' + appScope.join(","), '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');
var flowUrl = "https://www.facebook.com/v2.0/dialog/oauth?client_id=" + clientId + "&redirect_uri=" + redirect_uri + "&response_type=token&scope=" + appScope.join(",");
if(options !== undefined && options.hasOwnProperty("auth_type")) {
flowUrl += "&auth_type=" + options.auth_type;
}
var browserRef = window.open(flowUrl, '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');
browserRef.addEventListener('loadstart', function(event) {
if((event.url).indexOf(redirect_uri) === 0) {
browserRef.removeEventListener("exit",function(event){});
Expand Down
6 changes: 3 additions & 3 deletions dist/ng-cordova-oauth.min.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/oauth.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,11 @@ angular.module("oauth.providers", ["oauth.utils"])
redirect_uri = options.redirect_uri;
}
}
var browserRef = window.open('https://www.facebook.com/v2.0/dialog/oauth?client_id=' + clientId + '&redirect_uri=' + redirect_uri + '&response_type=token&scope=' + appScope.join(","), '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');
var flowUrl = "https://www.facebook.com/v2.0/dialog/oauth?client_id=" + clientId + "&redirect_uri=" + redirect_uri + "&response_type=token&scope=" + appScope.join(",");
if(options !== undefined && options.hasOwnProperty("auth_type")) {
flowUrl += "&auth_type=" + options.auth_type;
}
var browserRef = window.open(flowUrl, '_blank', 'location=no,clearsessioncache=yes,clearcache=yes');
browserRef.addEventListener('loadstart', function(event) {
if((event.url).indexOf(redirect_uri) === 0) {
browserRef.removeEventListener("exit",function(event){});
Expand Down

0 comments on commit 8cf5949

Please sign in to comment.