From 78444f3c6b240038d328600e7ab02fd524f33b7c Mon Sep 17 00:00:00 2001 From: Dovy Paukstys Date: Thu, 19 Dec 2019 21:32:37 -0500 Subject: [PATCH] Confirmed fix for #39. --- src/FamilySearch.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/FamilySearch.js b/src/FamilySearch.js index edb7ebf..c918881 100644 --- a/src/FamilySearch.js +++ b/src/FamilySearch.js @@ -174,11 +174,12 @@ FamilySearch.prototype.oauthResponse = function(state, callback){ */ FamilySearch.prototype.oauthToken = function(code, callback){ var client = this; - client.post(client.identHost() + '/cis-web/oauth2/v3/token?redirect_uri=' + this.redirectUri, { + client.post(client.identHost() + '/cis-web/oauth2/v3/token', { body: { grant_type: 'authorization_code', code: code, - client_id: client.appKey + client_id: client.appKey, + redirectUri: this.redirectUri }, headers: { 'Content-Type': 'application/x-www-form-urlencoded'