if i am using this rules at firestore
match /{document=**} {
allow read, write: if true;
}
getServerSideProps can get my data from firestore but if start using
match /{document=**} {
allow read, write: if request.auth != null;
}
i get
[Error [FirebaseError]: Missing or insufficient permissions.] { digest: undefined }
but im was logged in with firebase authentication
trying to use
const auth = getAuth();
// Очікуємо на зміну стану авторизації користувача
await new Promise((resolve) => {
onAuthStateChanged(auth, (user) => {
resolve(user);
});
});
but didnt help