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

clear stale states when creating new one #511

Merged
merged 1 commit into from
May 23, 2022
Merged

clear stale states when creating new one #511

merged 1 commit into from
May 23, 2022

Conversation

pamapa
Copy link
Member

@pamapa pamapa commented Apr 28, 2022

This fixes the case when clearStaleState is never called in user code. Sooner or later window.localStorage is full and adding an additional state results in a QuoteExceededError.

Closes/fixes #466

Checklist

  • This PR makes changes to the public API
  • I have included links for closing relevant issue numbers

@pamapa pamapa requested a review from kherock April 28, 2022 11:31
@codecov
Copy link

codecov bot commented Apr 28, 2022

Codecov Report

Merging #511 (1b39579) into main (7a6a20c) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #511      +/-   ##
==========================================
+ Coverage   75.17%   75.20%   +0.03%     
==========================================
  Files          44       44              
  Lines        1575     1577       +2     
  Branches      290      290              
==========================================
+ Hits         1184     1186       +2     
  Misses        364      364              
  Partials       27       27              
Flag Coverage Δ
unittests 75.20% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/OidcClient.ts 94.33% <100.00%> (+0.10%) ⬆️

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 7a6a20c...1b39579. Read the comment docs.

@pamapa pamapa changed the title clean stale states when creating new one clear stale states when creating new one Apr 28, 2022
@pamapa
Copy link
Member Author

pamapa commented May 2, 2022

@kherock Time to review this?

@pamapa
Copy link
Member Author

pamapa commented May 20, 2022

@kherock would be nice if you have time to review this one...

@kherock
Copy link
Collaborator

kherock commented May 20, 2022

sorry for the delay! This looks good to me.

@pamapa pamapa merged commit 54fda0f into main May 23, 2022
@pamapa pamapa deleted the fix-466 branch May 23, 2022 07:19
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.

QuoteExceededError from localStorage
2 participants