⛔️ 오류
파이어베이스 데이터 보내는 중에 오류
HYEBEEN
2023. 3. 16. 11:51
파이어베이스에서 Cloud Firestore에 데이터를 보내던 중 만난 오류

Cloud Firestore 의 규칙을 true로 수정해 줘도 해결이 되지 않아서봤더니
// 1. for Test mode
// Allow read/write access to all users under any conditions
// Warning: **NEVER** use this rule set in production; it allows
// anyone to overwrite your entire database.
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if true;
}
}
}
2. for Auth required mode ✅
// Allow read/write access on all documents to any user signed in to the application
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
env파일에 오타가 있어서 수정해 주었더니 해결되었습니다..ㅎ
VITE_API_KEY = .........
VITE_AUTH_DOMAIN = .........
VITE_PROJECT_ID = ..........
VITE_STORAGE_BUCKET = ...........
VITE_MESSAGE_SENDER_ID = ..........
VITE_APP_ID = ..................