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
service cloud.firestore { | |
match /databases/{database}/documents { | |
// Allow user to read only his documents. No write allowed | |
match /users/{user}/{document=**} { | |
allow read: if request.auth != null && request.auth.uid == user | |
} | |
} | |
} |
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
from firebase_admin import auth | |
from flask import request, abort, current_app | |
from functools import wraps | |
from configuration.settings import SHOULD_AUTHORIZE | |
def validate_token(access_token: str) -> tuple: | |
""" | |
Verifies that an access-token is valid and |
NewerOlder