How to check If particular Id already in Firebase collection

Viewed 27

Here , I want to check In All Documents that Uid is already exist or not if not

enter image description here

1 Answers

You simply have to query for this specific document and check if it exists as shown in the doc. You don’t specify which language you are using so I cannot copy/paste the appropriate code but the different examples show exactly how to do, in particular by using the exists property/method of the DocumentSnapshot.

Related