Skip to content

Commit

Permalink
fix(auth): update auth settings after refreshing (#338)
Browse files Browse the repository at this point in the history
cc #328
  • Loading branch information
silasbw committed Oct 19, 2018
1 parent 6132dd5 commit e8d914b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ class Request {
if ((res.statusCode === 401 || res.statusCode === 403) && auth.type) {
return refreshAuth(auth.type, auth.config)
.then(newAuth => {
this.requestOptions.auth = newAuth;
requestOptions.auth = newAuth;
return request(requestOptions, (err, res, body) => {
if (err) return cb(err);
Expand Down

0 comments on commit e8d914b

Please sign in to comment.