Firebase/Firestore/React - what stops a user from adding a million fields to their own user document?

Viewed 102

I'm coming from a SQL background, and I'm trying to wrap my head around the whole schemaless concept.

I think I got the jist of it, and I get the benefits of it - but if you have a frontend layer that has access to a Firestore DB, what stops the user from adding anything to the documents they have rights to write to?

I've looked at a lot of different React/Firebase/Firestore examples now, and they all seem to gloss over it - so maybe I'm missing something very obvious here?

1 Answers

what stops the user from adding anything to the documents they have rights to write to?

Aside from your security rules that validate that the document data being written, the only limit that is impossible to bypass for a single document with write access is the limit of the size of a single document: 1MB. You can read more in the documentation.

If you don't have any rules that restrict what data can be written to a document, this size is the only limit.

Related