firebase

firebase security rule to allow admin users to read/write all other users creates a security breach?

元气小坏坏 提交于 2021-02-11 05:57:30
问题 I am using cloud Firestore database and I have 'users' collection on my root database and in it there are all the users documents (named as the uid) and inside it the data I collect. I wanted to allow users to only read/write to their own collections so I started my security rules with service cloud.firestore { match /databases/{database}/documents { // Allow only authenticated content owners access match /users/{userId}/{documents=**} { allow read, write: if request.auth.uid == userId } } }

how to signout from firebase using django python

不打扰是莪最后的温柔 提交于 2021-02-11 05:55:52
问题 I am trying to create user authentication from back-end with python and firebase. So far creating a user and login actions worked perfectly. But for somehow i cannot find any information for signOut action. i'm using Pyrebase library. Any one has a suggestion? Here is the part it works: import pyrebase config = { #my private config informations } firebase = pyrebase.initialize_app(config) auth = firebase.auth() def createAccount(request): if request.method == "POST": email=request.POST.get(

firebase security rule to allow admin users to read/write all other users creates a security breach?

泪湿孤枕 提交于 2021-02-11 05:55:40
问题 I am using cloud Firestore database and I have 'users' collection on my root database and in it there are all the users documents (named as the uid) and inside it the data I collect. I wanted to allow users to only read/write to their own collections so I started my security rules with service cloud.firestore { match /databases/{database}/documents { // Allow only authenticated content owners access match /users/{userId}/{documents=**} { allow read, write: if request.auth.uid == userId } } }

Google Cloud Build & Firebase Deploy - “An unexpected error has occurred”

北战南征 提交于 2021-02-11 05:54:59
问题 I'm using Google Cloud Build to do a deployment to Firebase Hosting when a commit is on master. I'm using the Firebase Cloud Builder, deployed to my project. I've checked permissions in the Cloud Console and Firebase access is enabled. Everything seems to go well in generating the static HTML for hosting, but at the final build step it fails suddenly with this problem: Error: An unexpected error has occurred. Here is the step in my cloudbuild.yaml that fails: - name: gcr.io/$PROJECT_ID

Google Cloud Build & Firebase Deploy - “An unexpected error has occurred”

孤街浪徒 提交于 2021-02-11 05:54:34
问题 I'm using Google Cloud Build to do a deployment to Firebase Hosting when a commit is on master. I'm using the Firebase Cloud Builder, deployed to my project. I've checked permissions in the Cloud Console and Firebase access is enabled. Everything seems to go well in generating the static HTML for hosting, but at the final build step it fails suddenly with this problem: Error: An unexpected error has occurred. Here is the step in my cloudbuild.yaml that fails: - name: gcr.io/$PROJECT_ID

Google Cloud Build & Firebase Deploy - “An unexpected error has occurred”

◇◆丶佛笑我妖孽 提交于 2021-02-11 05:54:20
问题 I'm using Google Cloud Build to do a deployment to Firebase Hosting when a commit is on master. I'm using the Firebase Cloud Builder, deployed to my project. I've checked permissions in the Cloud Console and Firebase access is enabled. Everything seems to go well in generating the static HTML for hosting, but at the final build step it fails suddenly with this problem: Error: An unexpected error has occurred. Here is the step in my cloudbuild.yaml that fails: - name: gcr.io/$PROJECT_ID

What does FirebaseAppDelegateProxyEnabled do?

自古美人都是妖i 提交于 2021-02-11 05:09:15
问题 My issue (background notifications): I am using React Native Firebase. Everything is fine until recently I updated to version 6.7.1 of the library. After the update background notification(while app is closed) stopped working. Foreground is working. I found a suggestion here, to turn FirebaseAppDelegateProxyEnabled to YES in info.plist. And it did work! I can receive notifications fine now. But what is swizzling? I don't really understand what is this method of swizzling do, and what is the

What does FirebaseAppDelegateProxyEnabled do?

♀尐吖头ヾ 提交于 2021-02-11 05:08:36
问题 My issue (background notifications): I am using React Native Firebase. Everything is fine until recently I updated to version 6.7.1 of the library. After the update background notification(while app is closed) stopped working. Foreground is working. I found a suggestion here, to turn FirebaseAppDelegateProxyEnabled to YES in info.plist. And it did work! I can receive notifications fine now. But what is swizzling? I don't really understand what is this method of swizzling do, and what is the

(if, else) question check number equal or greater in Realtime database

可紊 提交于 2021-02-11 04:54:05
问题 How can I implement if-else to check if the value of the money field is equal or greater (pre defined value in code) checking on the Realtime database money field? Only after this verification runs the code? I did a web search but all the methods I have searched but none were successful in the implementation. ref.child("users").child(user.getUid()).addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { for (DataSnapshot ds :

How to access the object in the observable list

懵懂的女人 提交于 2021-02-11 04:53:48
问题 I'm building a quiz app. My idea is to show 1 question per page. How do I subscribe and get an object inside a list using Observable. Instead of using *ngFor which display all of my objects. Is there a way to access the object one by one inside the subscribe block. export class ExerciseFlashcardPage { questions: Observable < any > ; type: string; constructor( public navCtrl: NavController, public navParams: NavParams, public afd: AngularFireDatabase ) { this.type = this.navParams.get('data');