I have a very simple app in Angular, that should read a small Firebase database...
As simple as:
import { Component } from '@angular/core';
import { AngularFireDatabase } from 'angularfire2/database';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
courses: any[];
constructor(db: AngularFireDatabase) {
db.list('/courses/IlZ5lAPfQDmWAf52hAI4')
.valueChanges().subscribe(courses => {
this.courses = courses;
console.log(this.courses);
});
}
}
As it's for tests purpose, there should be no authentication to Firebase, in other words, anyone could read it.
The rules are set as:
service cloud.firestore {
match /{multi_path=*} {
match /{multi_path=**} {
allow read, write
}
}
}
I should mention that in the Firebase simulator, I can list the/courses/IlZ5lAPfQDmWAf52hAI4 document.
But I keep getting the error of not having the permission, e.g.: RROR Error: permission_denied at /courses/IlZ5lAPfQDmWAf52hAI4: Client doesn't have permission to access the desired data.
I can't figure out what's going on... Should be simple..
Thanks