Rewriting the Key from the Authorize method when using the createStorageServer #324
Open
1 task done
Labels
enhancement
New feature or request
Describe the feature
I am building a tiny sync layer between my client and server using the
createStorageServer
which is working great! However, I would like to be able to rewrite the requestkey
from theauthorize
method. This would allow me to namespace the data for each user.I noticed that there is also the
resolvePath
method, but this is called before theauthorize
method, and is synchronous, so I can't use it to rewrite the key.I ended up using a middleware to authorize and rewrite the key, but I think it would be nice to have this functionality built-in to the
createStorageServer.
Example
I would be happy to submit a PR for this if you think it's a good idea.
Additional information
The text was updated successfully, but these errors were encountered: