CopyPastor

Detecting plagiarism made easy.

Score: 1; Reported for: Exact paragraph match Open both answers

Possible Plagiarism

Plagiarized on 2022-06-15
by Ilak

Original Post

Original - Posted on 2019-01-30
by Md Nakibul Hassan



            
Present in both answers; Present only in the new answer; Present only in the old answer;

I have made modifications to my code to be able to work with these rules:

service cloud.firestore { match /databases/{database}/documents { match /{document=**} { allow read, write: if request.auth != null; } } }

The problem was the completion handler didn't work properly. The account was logged out before the documents were deleted. (Is this because the firebase functions are asynchronous??? or run in the background instead of the Main Actor??) Idk...
I fixed the problem by fixing the completion handler and checking if the deletion process is completed before singout()
Go to **Database** -> **Rules** :
**Then changed below rules**
service cloud.firestore { match /databases/{database}/documents { match /{document=**} { allow read, write: if false; } } }
**to below**
service cloud.firestore { match /databases/{database}/documents { match /{document=**} { allow read, write: if request.auth != null; } } }

        
Present in both answers; Present only in the new answer; Present only in the old answer;