- Next.js Firebase
- Security Rules
When running the Firebase Emulator, you can update your Firebase Firestore and Storage security rules by simply changing the files
By default, Makerkit comes with pre-configured Security Rules that work with the original boilerplate's data structure. However, you will likely be updating your structure to fit your SaaS data model, and therefore you will probably be updating the Firestore Security Rules.
To change your Firestore security rules, simply edit the
firestore.rules file in the root directory of your Makerkit repository; the Firebase Emulator will automatically pick the new changes up.
At the moment, Makerkit does not add any security rule for your Storage buckets; this will be added very soon.
Publishing your security rules is a critical pre-production step you should never forget; otherwise, your users will encounter runtime exceptions, ultimately leading to bugs in your app.
Remember: updating your repository's rules does not automatically publish them!
To publish your Security rules, open your Firebase Admin Console and copy-paste the content of your security rules. It can take some time before they fully propagate.