FirebaseError: Firebase Storage: User does not have permission to access

김용희·2022년 2월 2일
0

Failed to load resource: the server responded with a status of 400 (Bad Request)
위와 같은 오류 생겼을 때


firebase의
Storage 로 들어가서
Rules 의 값을 아래와 같이 변경

기존

read/write 모두 auth가 있는 경우에만 허용

rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
     allow read, write: if request.auth != null;
    }
  }
}​

변경 후

read를 분리하여 허용, write는 기존 권한 유지

rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
     allow read;
     allow write: if request.auth != null;
    }
  }
}
profile
He threw his knapsack over the brick wall

0개의 댓글