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

need secure-ls support sessionStorage #32

Open
ayun2001 opened this issue Nov 20, 2019 · 4 comments
Open

need secure-ls support sessionStorage #32

ayun2001 opened this issue Nov 20, 2019 · 4 comments

Comments

@ayun2001
Copy link

Hi Varun Malhotra, do you have any planning to let secure-ls support sessionStorage?

@YanDevDe
Copy link

From other fork, someone already tried it:
hansanwok#2
It may need to pull request here too.

@GsHeri
Copy link

GsHeri commented Jan 23, 2020

i need it too. will you merge it?
if not, would you mind explaining me how i can install the version with the PR integrated via npm? i've never done this before

@ghost
Copy link

ghost commented Jul 28, 2020

any news about this?

@gilbertg
Copy link

gilbertg commented Mar 17, 2022

A hacky TS solution

export class SecureStorage extends SecureLS {

	constructor(config: { isCompression?: boolean, encodingType?: string, encryptionSecret?: string, encryptionNamespace?: string, useSessionStore?: boolean }) {
		super(config);

		// tslint:disable-next-line:ban-ts-ignore
		// @ts-ignore
		super.ls = config.useSessionStore ? sessionStorage : localStorage;
	}
}

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

No branches or pull requests

4 participants