In the firestore security settings you can set conditions for writing/reading data.
Currently I have this piece:
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read: if request.auth != null && request.time <
resource.data.timeCreated + duration.value(1, 'h');
allow write: if request.auth != null;
}
}
}
Now I want to limit the writing; a user should only be able to send data every 5 minutes. How can I achieve this?