@stackfactor/client-api 1.1.94 → 1.1.96
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/users.js +6 -5
- package/package.json +1 -1
package/lib/users.js
CHANGED
|
@@ -401,17 +401,18 @@ const login = (email, password) => {
|
|
|
401
401
|
};
|
|
402
402
|
|
|
403
403
|
/**
|
|
404
|
-
* Login callback after authentication
|
|
404
|
+
* Login callback after authentication to exchange the code token for authentication and refresh tokens
|
|
405
405
|
* @param {String} code
|
|
406
|
-
* @
|
|
406
|
+
* @param {String} redirectUri
|
|
407
407
|
* @returns {Promise}
|
|
408
408
|
*/
|
|
409
|
-
const
|
|
409
|
+
const loginExchangeKeys = (code, redirectUri) => {
|
|
410
410
|
return new Promise(function (resolve, reject) {
|
|
411
411
|
const requestData = {
|
|
412
412
|
code: code,
|
|
413
|
+
redirectUri: redirectUri,
|
|
413
414
|
};
|
|
414
|
-
let request = client.post("api/v1/auth/
|
|
415
|
+
let request = client.post("api/v1/auth/loginexchangekeys", requestData);
|
|
415
416
|
request
|
|
416
417
|
.then((response) => {
|
|
417
418
|
resolve(response.data);
|
|
@@ -727,7 +728,7 @@ export default {
|
|
|
727
728
|
getUsers,
|
|
728
729
|
inviteUsers,
|
|
729
730
|
login,
|
|
730
|
-
|
|
731
|
+
loginExchangeKeys,
|
|
731
732
|
logout,
|
|
732
733
|
refreshToken,
|
|
733
734
|
removeAPIToken,
|