Skip to content

This is a demo app for android using firebase-auth & firestore.

Notifications You must be signed in to change notification settings

ujjwalmaity/FirebaseTestApp

Repository files navigation

FirebaseTestApp

Resource Uses

- Firebase Authentication
- Firebase Firestore

Features

1. Firebase OTP Authentication
2. Saving user registration details in Firebase Cloud Firestore
3. Activating or De-activating a user from backend

Database Firestore Rule

rules_version = '2';

service cloud.firestore {
  match /databases/{database}/documents {

    match /{document=**} {
      allow read, write: if false;
    }

    match /users/{document=**} {
      allow read: if isLogedInPhone();
      allow create: if isLogedInPhone();
      allow update, delete: if false;
    }

    function isLogedInPhone(){
    	return request.auth.token.phone_number != null;
    }

  }
}