0

I'm trying to limit unauthenticated users to post more than 1 document in a collection at least 1 every 15 minutes for example.

How can I achieve this using firebase rules?

Bear in mind, is talking about anonymous users.

Jaracara11
  • 17
  • 3
  • 1
    How are you identifying the user? – Dan Nagle Aug 08 '22 at 16:21
  • If you know nothing about the user, there is no way to limit what they do. You can [sign in the user anonymously](https://firebase.google.com/docs/auth/web/anonymous-auth) and then [implement a write rate limit in rules](https://stackoverflow.com/questions/56487578/how-do-i-implement-a-write-rate-limit-in-cloud-firestore-security-rules). – Frank van Puffelen Aug 08 '22 at 17:39
  • Can't I throttle the posts to my collection if request.auth == null? that's my idea, but I can't wrap my head around how to write such a rule. – Jaracara11 Aug 09 '22 at 12:13

0 Answers0