Skip to main content

Enable Firebase Feature

after we add our app in firebase and put the google-service.json file into our project, we need to enable some firebase features that our chess game app uses, first is the authentication feature, so that players can register a new account and also login

1. Enable Firebase Authentication

  • in Firebase Dashboard, click Authentication -> Sign in Method -> Email/Password

Example banner

  • and then enable email, and click save

Example banner

info

For now we only enable email/password authentication, you can also enable other authentication methods such as google sign-in, etc.

2. Enable Firebase Firestore

we also need to enable Firebase Firestore, so we can save our chess game data in firebase

  • click Firestore Database -> Create Database

Example banner

  • and chose Start in Production Mode -> and then click Next

Example banner

  • and then chose datacenter near you, and click Enable

Example banner

3. Enable Firebase Functions

we also need to enable Firebase Firestore, but to activate the firebase function, we are required to upgrade our project to the Blaze Plan

  • Click Function and click Upgrade Project

Example banner

  • Click Continue

Example banner

  • and here you are required to enter payment information, but don't worry you will not be charged a fee, as long as your resource usage is still within the limits set by firebase here https://firebase.google.com/pricing

Example banner

  • After your blaze plan is active, your firebase function should also be active

Example banner

4. Enable Firebase Realtime Database

We also need to enable Firebase Realtime Database, this feature is needed for real-time game synchronization and player presence detection. If a player is suddenly disconnected from the game, the game state will be properly handled

  • click Realtime Database -> Create Database

Example banner

  • Choose your database location, and click Next

Example

  • For this security rules, we will use test mode, so that we can test the database without any restrictions, later in production, you need to change this security rules to secure your databases, click Enable E

  • Okay, for now that's the only feature that must be activated in this Firebase panel, the rest will be activated when we deploy the Firebase Cloud Functions