-
Notifications
You must be signed in to change notification settings - Fork 56
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
Unable to use signed URLs #360
Comments
Thank you for submitting this issue, @samuellembke 🙏 I wasn't able to reproduce this behavior - can you triple-check if your access token and secret keys are correct? After you've checked them, run the following with the Sanity CLI: sanity documents delete secrets.mux This will clear the secrets from the dataset and prompt you to re-configure them. To do so, open a field where the Let me know if the issue remains after these steps :) |
I've hit this error and just tried the steps you laid out, @hdoro. I'm still getting the error. I'm running the studio locally (localhost:3333) and using the "development" environment on Mux. deps:
is there something I can do to help debug this? the error doesn't provide much help, unfortunately, so I'm not sure where to start looking thanks! |
I've hit the same error @jlengstorf and @samuellembke described and the issue persisted even after deleting and recreating the When looking through the Mux's API docs, I noticed however that Signing Keys have been moved from Video API to System API, hence the operation requires different permissions. And sure enough, after generating a new access token on Mux with write system permissions in addition to read and write video and read data, everything seems to be working as expected (both upload and preview in Sanity Studio with signed URLs). One issue that remains though and mentioned in #367 is that signed URL uploads produce assets with both signed and public playback IDs. |
Describe the bug
When enabling the "Enable Signed Urls" checkbox, it will say "401 Unauthorized" after clicking save.
When looking into the 401 request in the network view it gives a request to
https://xxxx.api.sanity.io/vxxxx/addons/mux/signing-keys/production?tag=sanity.studio
.This request will get the following response:
Normal video uploads work, just the signed urls feature doesn't, therefor it is not an issue with the api credentials, but probably with the implementation of the creation of the JWT token for signing urls.
A clear and concise description of what the bug is.
401 Unauthorized error when trying to enable Signed Urls feature.
To Reproduce
Steps to reproduce the behavior:
Install plugin to sanity project.
Set API Credentials
Upload video
Fine
Configure API Credentials and check the "Enable Signed URLs" checkbox
401 Unauthorized.
Expected behavior
For the signed urls feature to work
Screenshots
Which versions of Sanity are you using?
@sanity/cli (global) 3.27.1 (latest: 3.38.0)
@sanity/image-url 1.0.2 (up to date)
@sanity/overlays 2.3.36 (latest: 2.3.38)
@sanity/preview-kit-compat 1.4.16 (latest: 1.4.17)
@sanity/preview-url-secret 1.6.8 (latest: 1.6.9)
@sanity/react-loader 1.9.10 (latest: 1.9.12)
@sanity/types 3.38.0 (up to date)
@sanity/vision 3.38.0 (up to date)
sanity 3.38.0 (up to date)
What operating system are you using?
Linux
Which versions of Node.js / npm are you running?
10.2.4
v21.5.0
The text was updated successfully, but these errors were encountered: