Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Rolling back the changes on realmId field
  • Loading branch information
abisalehalliprasan committed Dec 17, 2018
commit c90b273935bac2c172714d73e598fb638963f0a4
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,10 @@ oauthClient.getToken().setToken({
"refresh_token":"<refresh_token>",
"x_refresh_token_expires_in":15552000,
"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.
Note : You can also optionally pass `id_token` to the setToken method.

// To get the tokens
oauthClient.getToken().getToken();
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": "intuit-oauth",
"version": "1.1.0",
"version": "1.1.1",
"description": "Intuit Node.js client for OAuth2.0 and OpenID",
"main": "./src/OAuthClient.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion sample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"ejs": "^2.5.2",
"dotenv": "^5.0.1",
"ngrok": "^2.2.9",
"intuit-oauth": "1.1.0"
"intuit-oauth": "1.1.1"
}
}
6 changes: 2 additions & 4 deletions src/OAuthClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ var os = require('os');
var winston = require('winston');
var path = require('path');
var fs = require('fs');
var jwt = require('jsonwebtoken');


var jwt = require('jsonwebtoken')

/**
* @constructor
Expand All @@ -52,7 +50,7 @@ function OAuthClient(config) {
this.clientId = config.clientId;
this.clientSecret = config.clientSecret;
this.redirectUri = config.redirectUri;
this.token = new Token(config);
this.token = new Token(config.token);
this.logging = config.hasOwnProperty('logging') && config.logging == true ? true : false;
this.logger = null;

Expand Down
1 change: 0 additions & 1 deletion src/access-token/Token.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ Token.prototype.setToken = function(tokenData) {
this.token_type = tokenData.token_type ;
this.expires_in = Date.now() + (tokenData.expires_in * 1000);
this.x_refresh_token_expires_in = Date.now() + (tokenData.x_refresh_token_expires_in * 1000);
this.realmId = tokenData.realmId || '';
this.id_token = tokenData.id_token || '';
return this;

Expand Down