oidc-client-ts
oidc-client-ts copied to clipboard
Typing issue: WebStorageStateStore.store should be an async store
I'm trying to use my own custom store implementation where all the data has to be read/write in an async manner.
userStore: new WebStorageStateStore({
store: new MyStore()
});
The issue I'm facing is that WebStorageStateStore uses async methods whereas WebStorageStateStore.store uses sync ones as it is of type Storage.
Solutions:
- I could make my own implementation of
WebStorageStateStorebut then I would loose or duplicate anything that this wrapper is doing -> so I don't really like that solution. - It seems that supporting an async store is already implemented as all the methods from
WebStorageStateStorereturns aPromise.resolveof the store's results (ex: line 34, line 43, ...). -> so the ideal solution would be to replace the type ofWebStorageStateStore.storeand make it reflect an asyncStoragetype instead
What do you think ?