Skip to content

Commit 04828b4

Browse files
author
Bertrand Marron
committed
Merge pull request #1 from IONISx/tusbar/add-base-url
Add IONISx baseURL option
2 parents 96a776e + c69514e commit 04828b4

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

lib/strategy.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ var Profile = require('./profile');
77

88
var Strategy = function (options, verify) {
99
options = options || {};
10-
options.authorizationURL = options.authorizationURL || 'https://ionisx.com/oauth2/authorize';
11-
options.tokenURL = options.tokenURL || 'https://ionisx.com/oauth2/token';
10+
options.baseURL = options.baseURL || 'https://ionisx.com';
11+
options.authorizationURL = options.authorizationURL || options.baseURL + '/oauth2/authorize';
12+
options.tokenURL = options.tokenURL || options.baseURL + '/oauth2/token';
1213
options.scopeSeparator = options.scopeSeparator || ',';
1314
options.customHeaders = options.customHeaders || {};
1415

@@ -18,7 +19,7 @@ var Strategy = function (options, verify) {
1819

1920
OAuth2Strategy.call(this, options, verify);
2021
this.name = 'ionisx';
21-
this._userProfileURL = options.userProfileURL || 'https://ionisx.com/api/user/me';
22+
this._userProfileURL = options.userProfileURL || options.baseURL + '/api/user/me';
2223
this._oauth2.useAuthorizationHeaderforGET(true);
2324
};
2425

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "passport-ionisx",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"description": "Passport strategy for authenticating with IONISx using the OAuth 2.0 API",
55
"keywords": [
66
"passport",

0 commit comments

Comments
 (0)