Replies: 1 comment 1 reply
-
|
unfortunately that's probably not possible since those functions are used in places that have to be sync. are you encrypting individual params? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
parseSearch and stringifySearch must be synchronous. Would it be possible to support functions that return
Promises?I work on an application that is used in the healthcare industry to manage your practice. For instance, the application supports sharing links to a list of patients filtered by surname. Since it's important to keep sensitive information private, we've implemented logic that encrypts/decrypts certain search params using crypto-js. This ensures that customers can share a link without accidentally leaking sensitive information.
crypto-jsis no longer maintained because the Web Crypto API has become widely available. I'm working on switching fromcrypto-jsto the Web Crypto API. The latter's interfaces are mainly asynchronous, which makes it impossible to integrate it into eitherparseSearchorstringifySearch.I don't know how significant such a change would be, but I can imagine that the use case I'm describing is common. If you wanted to integrate the Web Crypto API for serializing/parsing today, you would need to relocate the logic from the router definition to the components (in our case, we use React). If this the intended and proper use, just let me know!
I can imagine myself implementing the feature myself if it's feasible, but I'd probably need someone supporting me. I haven't dug into the router's internals yet.
Beta Was this translation helpful? Give feedback.
All reactions