Skip to content

Commit

Permalink
allow to change return URL
Browse files Browse the repository at this point in the history
  • Loading branch information
nicgirault committed Jan 5, 2016
1 parent f83bcec commit eea0f45
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "angular-trello-api-client",
"main": "dist/angular-trello-api-client.js",
"homepage": "https://github.com/nicgirault/angular-trello-api-client",
"version": "2.0.0",
"version": "2.1.0",
"authors": [
"nicgirault <nic.girault@gmail.com>"
],
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-trello-api-client-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions dist/angular-trello-api-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ angular.module('trello-api-client').constant('TrelloClientConfig', {
version: 1,
tokenExpiration: 'never',
scope: ['read', 'write', 'account'],
localStorageTokenName: 'trello_token'
localStorageTokenName: 'trello_token',
returnUrl: window.location.origin
});

angular.module('trello-api-client').factory('TrelloInterceptor', [
Expand Down Expand Up @@ -53,7 +54,7 @@ angular.module('trello-api-client').provider('TrelloClient', function($authProvi
return $authProvider.oauth2({
name: TrelloClientConfig.appName,
key: TrelloClientConfig.key,
returnUrl: window.location.origin,
returnUrl: TrelloClientConfig.returnUrl,
authorizationEndpoint: TrelloClientConfig.authEndpoint + "/" + TrelloClientConfig.version + "/authorize",
defaultUrlParams: ['response_type', 'key', 'return_url', 'expiration', 'scope', 'name'],
requiredUrlParams: null,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-trello-api-client",
"version": "2.0.0",
"version": "2.1.0",
"description": "",
"main": "gulpfile.js",
"dependencies": {
Expand Down
1 change: 1 addition & 0 deletions src/config.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ angular.module 'trello-api-client'
tokenExpiration: 'never'
scope: ['read', 'write', 'account']
localStorageTokenName: 'trello_token'
returnUrl: window.location.origin
}
2 changes: 1 addition & 1 deletion src/provider.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ angular.module 'trello-api-client'
$authProvider.oauth2 {
name: TrelloClientConfig.appName
key: TrelloClientConfig.key
returnUrl: window.location.origin
returnUrl: TrelloClientConfig.returnUrl
authorizationEndpoint: "#{ TrelloClientConfig.authEndpoint }/#{ TrelloClientConfig.version }/authorize"
defaultUrlParams: ['response_type', 'key', 'return_url', 'expiration', 'scope', 'name']
requiredUrlParams: null
Expand Down

0 comments on commit eea0f45

Please sign in to comment.