Skip to content
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

fixes issue with renewTokens that would drop scopes passed to getToken #985

Closed
wants to merge 3 commits into from

Conversation

aarongranick-okta
Copy link
Contributor

@aarongranick-okta aarongranick-okta commented Oct 22, 2021

Fixes issue: #942

scopes can be passed in the constructor or into the getToken function (getWithRedirect, getWithoutPrompt, etc.). The scopes are saved with the token and are passed along when renewing a single token or renewing using a refresh token. However when all tokens are renewed together (default action when autoRenew is true), the scopes passed to getToken were being dropped and the scopes passed in constructor were used instead.

To reproduce the issue clearly, some "integration" tests which run against a live environment but are not using a test app or a web browser. Rewrite unit tests for renewTokens to cover the specific logic of this function. The previous unit tests (oauthUtil.setupFrame) are superseded by the new integration tests.

OKTA-429429

@codecov-commenter
Copy link

Codecov Report

Merging #985 (5cce60f) into master (2775ad8) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #985      +/-   ##
==========================================
+ Coverage   92.27%   92.30%   +0.02%     
==========================================
  Files         121      121              
  Lines        3497     3510      +13     
  Branches      726      735       +9     
==========================================
+ Hits         3227     3240      +13     
  Misses        270      270              
Impacted Files Coverage Δ
lib/oidc/renewTokens.ts 100.00% <100.00%> (ø)

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 2775ad8...5cce60f. Read the comment docs.

Copy link
Contributor

@shuowu shuowu left a comment

Choose a reason for hiding this comment

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

Thanks for adding the integration test suite!

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

Successfully merging this pull request may close these issues.

None yet

4 participants