zendesk / linksf

A mobile website to connect those in need in to services that can help them
http://link-sf.com
Apache License 2.0
62 stars 38 forks source link

Add authentication to writes #337

Closed adam-hart closed 7 years ago

adam-hart commented 7 years ago

This adds the user's authentication token to any Firebase write request. I also restricted the DB rules in firebase to require auth for writes here https://console.firebase.google.com/project/vivid-inferno-4672/database/rules.

@zendesk/volunteer

roseleaf commented 7 years ago

fixes https://github.com/zendesk/linksf/issues/330

roseleaf commented 7 years ago

for documentation we'll want to include that for the firebase config

{
  "rules": {
    ".read": true,
    ".write": true,
    "organizations": {
      ".indexOn": [
        "id"
      ]
    },
    "services": {
      ".indexOn": [
        "organization"
      ]
    },
    "regular_schedules": {
      ".indexOn": [
        "organization_id"
      ]
    }
  }
}
roseleaf commented 7 years ago

I guess update the rules config file with it