🔐 Setup Admin Authentication
Configure Firebase Authentication for admin access
Step 1: Enable Firebase Authentication
2
Click "Get Started" (if not already enabled)
3
Go to "Sign-in method" tab
4
Enable these providers:
- Google - Click, enable, save
- Email/Password - Click, enable, save
Step 2: Add Admin Users
2
Click "Add user" button
3
Enter admin email and password:
Email: admin@chill-celebration.com
Password: (choose a strong password)
4
Click "Add user"
⚠️ Remember this email and password - you'll use it to login to the admin panel
Step 3: Access Control (No Code Changes Needed!)
✅ Access is controlled entirely through Firebase Console - no code changes required!
1
Only users added in Firebase Console → Authentication → Users can login
2
To add more admins: Go to Authentication → Users → Click "Add user"
3
To remove admin access: Delete the user from Firebase Console
⚠️ All authenticated users are admins. Only add trusted users in Firebase Console.
Step 4: Test Admin Login
1
Go back to your main app (index.html)
2
Click the admin login button
3
Try both methods:
- Google Sign-In - Click "Sign in with Google"
- Email/Password - Enter the credentials you created
✅ If successful, you'll be redirected to the admin dashboard
📋 Quick Reference
Firebase Console:
https://console.firebase.google.com/project/chillncelebration
Authentication:
→ Authentication → Sign-in method
→ Enable: Google, Email/Password
Add Users:
→ Authentication → Users → Add user
Authorized Emails:
→ Edit firebase-auth.js → adminEmails array
← Back to Main App