Access images from R2 based on id token from OAuth2

I am having several images in R2 and I want to make them accessible to my customers that are authenticated via Oauth2 (AWS Cognito).

Is there a way to give them full access to the data and denying access to all non-authenticated users?

Would be great if you could help me here! :grinning:

You are probably want to use a worker to handle auth and requests to the bucket.

@Cyb3r-Jak3 Many thanks for getting back to me. Is there some manual or something to make it work? Because I am quite inexperienced when it comes to these matters. I have to write workers in JavaScript and Python is not possible, right?

There is the developer documentation which contains some examples. The main language that people write workers is JavaScript, but it is possible to create workers in other language with WASM, but it is more complex.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.