Created
May 9, 2015 20:19
-
-
Save pankajpatel/e811cabe0b31c83746af to your computer and use it in GitHub Desktop.
Firebase Security Rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"rules": { | |
"profiles": { | |
"$uid": { | |
// grants write access to the owner of this user account whose uid must exactly match the key ($uid) | |
".write": "auth !== null && auth.uid === $uid", | |
// grants read access to any user who is logged in with an email and password | |
".read": "auth !== null && auth.provider === 'password'" | |
} | |
}, | |
"conatcts":{ | |
"$uid": { | |
// grants write access to the owner of this user account whose uid must exactly match the key ($uid) | |
".write": "auth !== null && auth.uid === $uid", | |
// grants read access to any user who is logged in with an email and password | |
".read": "auth !== null && auth.provider === 'password'" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment