MichaelSolati/geofirestore-js

Custom document key

Joozty opened this issue ยท 1 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
});