Complete these steps once to enable Google login and per-user data storage.
Step 1 — Create a Firebase Project
Go to console.firebase.google.com → click Add project → follow the prompts (disable Google Analytics if you want to keep it simple).
Step 2 — Enable Google Sign-In
In your project → Authentication → Get started → Google → toggle Enable → Save.
Step 3 — Enable Firestore
In your project → Firestore Database → Create database → choose Start in test mode → pick a region → Done.
Step 4 — Add Firestore Security Rules
Firestore → Rules tab → replace with this (protects each user's data):
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /users/{userId} {
allow read, write: if request.auth != null
&& request.auth.uid == userId;
}
}
}
Step 5 — Get Your Config & Paste It
Project Settings (⚙️ gear icon) → Your apps → Add app → Web → copy the firebaseConfig object → paste it at the top of this HTML file replacing the placeholder values.
✓ That's it!
Once the config is pasted, reload the page and Google Sign-In will work. Every user who logs in gets their own private data store.