MichaelSolati / geofirestore-js

Location-based querying and filtering using Firebase Firestore.

Home Page:https://geofirestore.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom document key

Joozty opened this issue Β· comments

Is there a way to specify a custom document key? I would like to write security rules like this and not sure if your awesome library allows it. πŸ™‚

    match /geofire/{uid} {
      allow read: if true;
      allow write: if request.auth.uid == uid;
    }

Yea, just as you would do this in firebase...

firestore.collection('geofire').doc(uid).set({
  // custom stuff here
});

You can do this with geofirestore:

geofirestore.collection('geofire').doc(uid).set({
  // custom stuff here
});