Change register response access_token to scalar_token
This commit is contained in:
parent
69e8cb6f44
commit
46d306a217
1 changed files with 3 additions and 1 deletions
|
@ -34,8 +34,10 @@ class ScalarAuthClient {
|
|||
defer.reject(err);
|
||||
} else if (response.statusCode / 100 !== 2) {
|
||||
defer.reject({statusCode: response.statusCode});
|
||||
} else if (!body || !body.scalar_token) {
|
||||
defer.reject(new Error("Missing scalar_token in response"));
|
||||
} else {
|
||||
defer.resolve(body.access_token);
|
||||
defer.resolve(body.scalar_token);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue