Setup (one-time, Firebase console)
This app uses the wca-attendance-tracker Firebase project with a shared team passcode instead of accounts. One-time setup:
1. Authentication → Sign-in method → enable Anonymous.
2. Firestore → create doc worshipflow/config with field pin = your chosen passcode (string).
3. Firestore → Rules:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /worshipflow/{doc} {
allow read: if request.auth != null
&& doc != 'config';
allow write: if request.auth != null
&& doc != 'config'
&& request.resource.data.pin ==
get(/databases/$(database)/documents/worshipflow/config).data.pin;
}
match /worshipflow/sessions/{sub}/{planId} {
allow read: if request.auth != null;
allow write: if request.auth != null
&& request.resource.data.pin ==
get(/databases/$(database)/documents/worshipflow/config).data.pin;
}
match /attendance/{userId} {
allow read, write: if request.auth != null
&& request.auth.uid == userId;
}
}
}
4. Add the deployed domain under Authentication → Settings → Authorized domains.
To change the passcode later, edit worshipflow/config and tell the team the new code.