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

How to use useStorage hooks with SecureStorage? #34

Open
dimadolgopolovn opened this issue May 17, 2023 · 2 comments
Open

How to use useStorage hooks with SecureStorage? #34

dimadolgopolovn opened this issue May 17, 2023 · 2 comments

Comments

@dimadolgopolovn
Copy link

dimadolgopolovn commented May 17, 2023

I have tried every combination of the lines below in popup.tsx.

const secureStorage = new SecureStorage({ copiedKeyList: ["shield-modulation"], area: "local" })
secureStorage.setPassword(MY_PASSWORD)

const [PROFILE_LIBRARY] = useStorage({ key: REMOTE_COOKIES_COLLECTION, instance: secureStorage })

background.ts:

const secureStorage = new SecureStorage({ copiedKeyList: ["shield-modulation"], area: "local" })
secureStorage.setPassword(MY_PASSWORD)
secureStorage.set(...)

How to get the same storage data in background.ts and popup.tsx with SecureStorage?
It works with regular Storage. Documentation on SecureStorage is missing.

@mrcnk
Copy link

mrcnk commented Jul 3, 2023

I have pretty much the same issue. I would like to access some data encrypted in SecureStorage with service worker instance of Chrome extension. As you mentioned, local and session data replicates just fine. @dimadolgopolovn did you by any chance make some progress since May?

@dimadolgopolovn
Copy link
Author

@mrcnk no. If I remember it right, I just moved all storage interactions to background.js where you don't need a hook to access secure storage.

@dimadolgopolovn dimadolgopolovn closed this as not planned Won't fix, can't repro, duplicate, stale Jul 3, 2023
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

2 participants