There are few aspects in that matter.
Open access
If for example you've a database that have permission of any then anyone can create app and spoof as they are you.
But, they won't need to go so far as they can do it using any API explorer like Postman.
Data integrity
This is not a security concern per-say but more a data integrity one, to avoid that there are few common solutions
- CORS - for web - blocking access to specific URLs only.
- Package name - for Android and iOS - validating the origin of the package.
The first one CORS is pretty hard to overcome in web browsers, but in mobile there a quick workaround to get over all of that and that is by contacting the API endpoint directly.
So, for example instead of using the appwrite package for flutter projects the spoofer can use the http library and make direct calls to the REST API. In that way Appwrite won't be able to know where the request came from.
That's true for any BaaS out there including Firebase.
To mitigate this issue Apple created DeviceCheck and Android created Play integrity and to use them in Firebase for example you can use the https://firebase.google.com/docs/app-check solution, as it ain't easy to provide out-of-the-box solution for that.
As of now Appwrite doesn't support any of the common integrity checks out there but you can track the issues regarding that matter.
Permissionized
Any one can use packet analyzer apps like Wireshark to get hold of all the API requests, and as such all web-apps out there using the network tab.
Becuase of that, in general when passing data on the web you should use on of these two approaches
- Allow to all
- Allow by permission
When you're allowing data by permission, then it may be inconveniente when someone uses mocking your app package to get access, but that will help only passing the first barrier nothing more.
Package name and CORS protection in Appwrite mainly meant to be used as general guards and not protecting against attacks, etc. as for that Appwrite has many other code logic guards like the rate limiter