The game cannot connect to the database because of a "Missing or insufficient permissions" error. This is usually because the default security rules in your Firebase project are too restrictive.
To fix this, please go to your Firebase project, navigate to Firestore Database > Rules, and replace the existing rules with the following:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /users/{userId} {
// Allows users to read and write their own profile document (for display name).
// This is secure because Firebase Auth ensures only the matching UID can access it.
allow read, write: if request.auth != null && request.auth.uid == userId;
}
match /games/{userId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
match /monopoly_games/{userId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
}
}