This module is a nearly 100% implemented Firestore wrapper, this is not for Google’s real-time database see RoBase for a real-time database implementation.
The way it works.
It uses Firebase’s Authentication for access to the database without letting anyone with the API key and URL change/read it.
Documentation.
Coming Soon.
Module.
This is the first version of RoFirestore so please let me know of any bugs or issues!
There will be documentation for everything but in firestore you need to set the rules to always allow that user id of the fake one you created,
Set up authentication with email enabled
Create a user with authentication and make their email and password memorable but FAKE nothing will happen with it but just for security use a fake email and password
Set rules to allow that user to read/write, example:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth != null && request.auth.uid == "<USERID>";
}
}
}
Get the project id from the URL, it can be found after the https://console.firebase.google.com/u/0/project/<PROJECTID>/
Get the API key and initialize the app in Roblox with your credentials, for example:
local app = require(script.RoFirestore)({
apikey = "<APIKEY>",
email = "<EMAIL>",
password = "<PASSWORD>",
projectId = "<PROJECTID>"
}, false) -- this boolean is determining if the app is in debug mode or not
Something I’d love to see is a guide to Firebase Rules for HTTPService. I’m currently modifying RobaseService heavily for tightknit integration and want to keep projects secure using them. Do you have any resouces on this?
Not at the moment sorry, however I could do some searching if you would like. Its just that I have prior experience with google firebase and i wanted to make my game use firebase for some reason. However there are helpful resources for learning the rest API a little bit more if that’s what you were asking also I did publish a new version secretly with a better version of my serializer with support for arrays and dictionaries.