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

feat: add option to save session data to local storage #900

Merged
merged 2 commits into from
Dec 4, 2024

Conversation

potty
Copy link
Contributor

@potty potty commented Nov 29, 2024

Description

Added init config option useLocalStorage to save session data to local storage instead of cookie. It's mandatory for environments where cookie isn't usable, like Electron apps.

List Github issue(s) which this PR fixes.

Type of change

Delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How has this been tested?

Delete options that are not relevant.

  • Manual testing
  • Added unit tests

@potty potty self-assigned this Nov 29, 2024
Copy link

github-actions bot commented Nov 29, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@potty
Copy link
Contributor Author

potty commented Nov 29, 2024

I have read the CLA Document and I hereby sign the CLA

srv-gh-o11y-gdi-cla added a commit to splunk/cla-agreement that referenced this pull request Nov 29, 2024
@potty potty marked this pull request as ready for review December 3, 2024 14:08
@potty potty requested review from a team as code owners December 3, 2024 14:08
if (
!sessionState.id ||
typeof sessionState.id !== 'string' ||
!sessionState.id.length ||
Copy link
Member

Choose a reason for hiding this comment

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

Do you need this here... I guess it is covered with !== 32

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was part of the original code, I'm refactoring this in upcoming PR.

!sessionState.id ||
typeof sessionState.id !== 'string' ||
!sessionState.id.length ||
sessionState.id.length !== 32
Copy link
Member

Choose a reason for hiding this comment

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

could you please use SESSION_ID_LENGTH? I mean can be done in the upcoming PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, it will be improved in upcoming PR.

@potty potty merged commit 767d36e into main Dec 4, 2024
6 checks passed
@potty potty deleted the feat/local-storage-session branch December 4, 2024 09:53
@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants