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

Store session keys and node info in local storage #7

Merged
merged 3 commits into from
Jul 25, 2024

Conversation

ch1bo
Copy link
Member

@ch1bo ch1bo commented Jul 24, 2024

This allows us to survive random refreshes and we can invalidate session
keys on-demand using a button or so.

ch1bo added 2 commits July 24, 2024 19:05
This allows us to survive random refreshes and we can invalidate session
keys on-demand.
@ch1bo ch1bo requested a review from yHSJ July 24, 2024 17:40
@ch1bo ch1bo force-pushed the local-storage branch 2 times, most recently from 98ad252 to 8fc9224 Compare July 24, 2024 17:55
This allows us to easily flip the persistent storage feature on and off easily.
@Quantumplation Quantumplation merged commit 48dc286 into main Jul 25, 2024
@Quantumplation Quantumplation deleted the local-storage branch July 25, 2024 03:34
let privateKey = window.localStorage.getItem("hydra-doom-session-key");
if (privateKey == null) {
if (persistentSession && privateKey == null) {
Copy link
Member Author

Choose a reason for hiding this comment

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

@Quantumplation There is another place where localstorage is used. I'll set it also below.

Or should we maybe use a .env var to only enable this in DEVELOPMENT or so?

Copy link
Member Author

Choose a reason for hiding this comment

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

Made it fully optional with: 5a12385

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.

2 participants