Skip to content

Commit d235ab2

Browse files
committed
Add IONISx baseURL option
1 parent 96a776e commit d235ab2

1 file changed

Lines changed: 4 additions & 3 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

0 commit comments

Comments
 (0)