Skip to content

fix: properly store refreshed tokens in websocket libraries #920

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2019

Conversation

dpopp07
Copy link
Contributor

@dpopp07 dpopp07 commented Jul 23, 2019

This resolves both #849 and #902. I'm sad to say that this is all that was causing the issue - putting the objects into extend() in the wrong order, causing the refreshed tokens to be overwritten by the old ones. Once the old token expired, no further new connections could be made.

Test case added to verify the fix.

this fixes a bug that overrided the refresh token with the old token, causing token expirations to be unavoidable
@codecov-io
Copy link

codecov-io commented Jul 23, 2019

Codecov Report

Merging #920 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #920      +/-   ##
==========================================
+ Coverage   53.94%   53.98%   +0.04%     
==========================================
  Files          18       18              
  Lines        4462     4462              
  Branches      905      905              
==========================================
+ Hits         2407     2409       +2     
+ Misses       2053     2051       -2     
  Partials        2        2
Impacted Files Coverage Δ
lib/recognize-stream.ts 64.63% <100%> (ø) ⬆️
lib/synthesize-stream.ts 82.75% <100%> (ø) ⬆️
test/resources/auth_helper.js 100% <0%> (+22.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7021798...50216da. Read the comment docs.

@dpopp07 dpopp07 merged commit 4b8df28 into master Jul 23, 2019
@dpopp07 dpopp07 deleted the fix-websocket-auth-header branch July 23, 2019 18:11
watson-github-bot pushed a commit that referenced this pull request Jul 23, 2019
## [4.2.6](v4.2.5...v4.2.6) (2019-07-23)

### Bug Fixes

* properly store refreshed tokens in websocket libraries ([#920](#920)) ([4b8df28](4b8df28))
Copy link

@mkistler mkistler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants