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

Remove local storage. #4

Merged
merged 1 commit into from
Oct 31, 2023
Merged

Remove local storage. #4

merged 1 commit into from
Oct 31, 2023

Conversation

ray-lee
Copy link
Member

@ray-lee ray-lee commented Oct 31, 2023

What does this do?

This removes the use of local storage to save auth tokens. Tokens are now only stored in memory. In browser usage, this means that each browser window/tab that is opened must retrieve its own token, instead of using a locally saved one. (Note that this doesn't necessarily mean that the user needs to enter their credentials for each window/tab; as long as there is a valid session with the services layer, the token retrieval is transparent.)

Why are we doing this? (with JIRA link)

This improves security, since browser local storage is vulnerable to XSS attacks.

How should this be tested? Do these changes have associated tests?

Sign in/sign out should continue to work.

Dependencies for merging? Releasing to production?

None

Has the application documentation been updated for these changes?

n/a

Did someone actually run this code to verify it works?

@ray-lee ran this locally.

@codecov
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Files Coverage Δ
src/session.js 87.75% <ø> (+0.71%) ⬆️
src/tokenHelpers.js 100.00% <ø> (ø)

📢 Thoughts on this report? Let us know!.

@ray-lee ray-lee marked this pull request as ready for review October 31, 2023 15:49
@ray-lee ray-lee merged commit 12a7c28 into master Oct 31, 2023
3 checks passed
@ray-lee ray-lee deleted the remove-local-storage branch October 31, 2023 15:50
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

1 participant