Access control for web app reading from R2

I’d like to create a small webapp for personal use which which’ll read files from R2, but for obvious reasons I’m not going to be using API tokens in a website that is hosted online.

So I guess what I want is an authentication system where a user logs in with his or her password, which can then be exchanged for a temporary token to list, and read files.

In broad terms, how would you go about building such a thing on Cloudflare?

Either handle the R2 interaction on the backend or use presigned URLs to provide temporary access to a single operation (they’d request your backend to list bucket A or download file B and you respond with that URL).

Sounds like a plan!

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