Documentation
Firebase Setup
Firebase is Google's platform for developing mobile and web applications. This guide will help you set up Firebase Firestore for use with Cryptica.
Security Notice
It's essential to set up proper security rules in Firebase to protect your data. Follow this guide carefully to ensure your passwords remain secure.
Setup Steps
Step 1: Create a Firebase Project
- Go to firebase.google.com and sign in with your Google account
- Click 'Add project' and follow the setup wizard
- Enable Google Analytics if desired (optional)
Step 2: Set Up Firestore Database
- In your Firebase project, navigate to Firestore Database
- Click 'Create database' and choose a starting mode (start in test mode, we'll add security rules later)
- Select your database location and click 'Enable'
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /items/{key} {
allow read, write: if request.auth != null &&
request.auth.uid == request.resource.data.value.userId;
}
}
}
These security rules ensure that users can only access their own data. The rules protect each user's passwords by checking the authenticated user ID.
Step 3: Set Up Authentication
- In your Firebase project, navigate to Authentication
- Click 'Get started' and enable the authentication methods you want to use (Email/Password is recommended)
- Configure the sign-in providers according to Firebase documentation
Cryptica uses Firebase authentication to secure your data. You need to sign in with the same account on all your devices to sync your passwords.
Step 4: Get Firebase Configuration
- In your Firebase project, click the gear icon and select 'Project settings'
- Scroll down to the 'Your apps' section and register a web app if you haven't already
{
apiKey: "YOUR_API_KEY",
authDomain: "your-project-id.firebaseapp.com",
projectId: "your-project-id",
storageBucket: "your-project-id.appspot.com",
messagingSenderId: "YOUR_MESSAGING_SENDER_ID",
appId: "YOUR_APP_ID"
}
Step 5: Configure Cryptica
- Open Cryptica and go to Settings
- In the Database section, select Firebase as the provider
- Enter your Firebase configuration details
Remember that all sensitive data is encrypted before being stored in Firebase. Your master password is never sent to Firebase servers.
Troubleshooting
Connection Failed
Check that your Firebase configuration is correct. Look for typos in the API key or project ID.
Authentication Issues
Make sure you've enabled the authentication methods you're trying to use in the Firebase console.
CORS Issues
If you're experiencing CORS issues, ensure your Firebase project's authentication settings have your app's domain in the allowed domains list.