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

Add support for StorageArea API #1180

Open
Kurolox opened this issue Sep 20, 2023 · 0 comments · May be fixed by #1181
Open

Add support for StorageArea API #1180

Kurolox opened this issue Sep 20, 2023 · 0 comments · May be fixed by #1181

Comments

@Kurolox
Copy link

Kurolox commented Sep 20, 2023

I'm dealing with a particular use case where I'm using oidc-client-ts in a browser extension that uses multiple content scripts in different domains.

Currently, oidc-client-ts is limited to use the Web Storage API, which is limited to each domain and it's not a good fit for my particular use case (Each domain has their own storage pairs, which means that the token credentials are stored once for each domain rather than having the same token being shared between all domains )

Meanwhile, the StorageArea API allows for an extension to store data in itself, which would allow this kind of use case where a token has to be shared between multiple domains could be implemented.

As far as I can see the only thing needed to implement this change would be to make a few adaptations to the WebStorageStateStore constructor to allow for a StorageArea store parameter, and adapt the API calls to work with them (Everything is pretty much the same as the Storage API, it mostly differs on the naming convention of the methods of the API)

I'm willing to make the contribution myself, but I'd like to double check beforehand if this is fine before working on it.

@Kurolox Kurolox linked a pull request Sep 21, 2023 that will close this issue
2 tasks
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 a pull request may close this issue.

1 participant