본문 바로가기

플러터(Flutter)

Firestore db 권한 설정

1. Firestore에 규칙 추가

규칙 택 선택

 

규칙 추가

    match /user/{uid} {
    	allow read, write: if request.auth != null && request.auth.uid == uid;
    }
    
    match /user/{uid} {
    	allow read: if request.auth != null;
    }
    
    match /chats/{document=**} {
      allow read, create: if request.auth != null;
    }

request.auth는 로그인 인증정보가 있어야 한다는 뜻

document=** 의 뜻은 하위 모든 문서를 포함