Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Adding realmID support to setToken() + fixing sample app package.json
  • Loading branch information
abisalehalliprasan committed Dec 15, 2018
commit c5fc89c88b1cc3417c0d0029f766753d9a567c96
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,13 @@ oauthClient.getToken().setToken({
"expires_in": 3600,
"refresh_token":"<refresh_token>",
"x_refresh_token_expires_in":15552000,
"access_token":"<access_token>"
"access_token":"<access_token>",
"realmId":"<realmId>", // optional
"id_token":"<id_token>" // optional
});

Note : You can also optionally pass `realmId` and `id_token` to the setToken method.

// To get the tokens
oauthClient.getToken().getToken();

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
"cors": "^2.8.1",
"express": "^4.14.0",
"is-travis": "^1.0.0",
"istanbul": "^0.4.5",
"mocha": "^5.0.4",
"nock": "^9.2.3",
"nyc": "^11.6.0",
Expand Down
1 change: 0 additions & 1 deletion src/OAuthClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ OAuthClient.authorizeEndpoint = 'https://appcenter.intuit.com/connect/oauth2';
OAuthClient.tokenEndpoint = 'https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer';
OAuthClient.revokeEndpoint = 'https://developer.api.intuit.com/v2/oauth2/tokens/revoke';
OAuthClient.userinfo_endpoint_production = 'https://accounts.platform.intuit.com/v1/openid_connect/userinfo'
OAuthClient.userinfo_endpoint = 'https://accounts.platform.intuit.com/v1/openid_connect/userinfo';
OAuthClient.userinfo_endpoint_sandbox = 'https://sandbox-accounts.platform.intuit.com/v1/openid_connect/userinfo';
OAuthClient.migrate_sandbox = 'https://developer-sandbox.api.intuit.com/v2/oauth2/tokens/migrate';
OAuthClient.migrate_production = 'https://developer.api.intuit.com/v2/oauth2/tokens/migrate';
Expand Down
4 changes: 3 additions & 1 deletion src/access-token/Token.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ Token.prototype.getToken = function() {
access_token: this.access_token,
expires_in: this.expires_in,
refresh_token: this.refresh_token,
x_refresh_token_expires_in: this.x_refresh_token_expires_in
x_refresh_token_expires_in: this.x_refresh_token_expires_in,
realmId: this.realmId,
id_token: this.id_token
};

};
Expand Down