firebase

Angular 8 /Firebase: how do I set the displayName when creating user with email and password?

安稳与你 提交于 2021-02-11 16:51:02
问题 After reading so many posts and empty(or not?) solutions, I figured that the best thing was to post of my own. So my goal is just to get the displayName of the user so in a list of posts or whatever, the authorship doesnt look ugly with a uid... Here's what I find relevant for the problem: Signup reactive form, later called on onInit: createForm() { this.registerForm = this.fb.group( { name: ['', Validators.required], email: ["", [Validators.required]], password: [null, [Validators.required,

Angular 8 /Firebase: how do I set the displayName when creating user with email and password?

亡梦爱人 提交于 2021-02-11 16:48:59
问题 After reading so many posts and empty(or not?) solutions, I figured that the best thing was to post of my own. So my goal is just to get the displayName of the user so in a list of posts or whatever, the authorship doesnt look ugly with a uid... Here's what I find relevant for the problem: Signup reactive form, later called on onInit: createForm() { this.registerForm = this.fb.group( { name: ['', Validators.required], email: ["", [Validators.required]], password: [null, [Validators.required,

Enable Firebase persistence on certain nodes

帅比萌擦擦* 提交于 2021-02-11 16:39:21
问题 For a new project we want to experiment with Firebase Database, the idea is to store SEO, Product, User Preferences and so on. We are expecting that the SEO data will be the bigger space consumer and the client doesn't need to save this information locally as will be only used for statistical purposes Is it possible to enable Firebase Database Persistence only on certain nodes and exclude others? Thanks for your help 回答1: Persistence can only be configured all or nothing. This is true for

Send push notification to people nearby through Firebase Cloud Function without manually managing push tokens?

十年热恋 提交于 2021-02-11 15:59:27
问题 Seems like majority of solutions here require the developer to manually save each user's push token in addition to Firebase saving these tokens as well, then iterate through these and send out notifications. This is not really desirable since I would be storing push tokens in two separate places and need to make sure their lifecycle management is synchronized, which is error prone 😢Is there a better way? Some options I considered: Give each user a person/unique topic, then map out a

Send push notification to people nearby through Firebase Cloud Function without manually managing push tokens?

纵饮孤独 提交于 2021-02-11 15:59:04
问题 Seems like majority of solutions here require the developer to manually save each user's push token in addition to Firebase saving these tokens as well, then iterate through these and send out notifications. This is not really desirable since I would be storing push tokens in two separate places and need to make sure their lifecycle management is synchronized, which is error prone 😢Is there a better way? Some options I considered: Give each user a person/unique topic, then map out a

how to compare user input data with my firestore record

心已入冬 提交于 2021-02-11 15:44:00
问题 I want to compare the input data of a user, with my firestore record (data that is already stored in my Firebase. Task<QuerySnapshot> pLJava = CoRef .whereEqualTo("ProgrammingLanguages", "Java") .get() .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() { @Override public void onComplete(@NonNull Task<QuerySnapshot> task) { if (task.isSuccessful()) { for (QueryDocumentSnapshot document : task.getResult()) { // document.getData(); id = document.getId(); if (id.contains("Java")) { }

I need to update a certain array entry of my Map in Firestore

烂漫一生 提交于 2021-02-11 15:40:55
问题 I want to update a product of my products array. I have an array of products in a collection products[{ - 0 productPrice: 123 - 1 productPrice: 432 }] In my code I have passed the position of the element I want to update in that array of products suspend fun updateProductPrice(position:Int,shopId: String,price: Int): Resource<Unit> { FirebaseFirestore.getInstance().collection("shops").document(shopId).update("products"[position]) //here I need to get productPrice and update its value to the

I need to update a certain array entry of my Map in Firestore

烈酒焚心 提交于 2021-02-11 15:40:46
问题 I want to update a product of my products array. I have an array of products in a collection products[{ - 0 productPrice: 123 - 1 productPrice: 432 }] In my code I have passed the position of the element I want to update in that array of products suspend fun updateProductPrice(position:Int,shopId: String,price: Int): Resource<Unit> { FirebaseFirestore.getInstance().collection("shops").document(shopId).update("products"[position]) //here I need to get productPrice and update its value to the

Using Firebase Auth Custom Claims for custom permissions

早过忘川 提交于 2021-02-11 15:21:56
问题 Initial situation: I am developing an app (iOS, Android, Web App) that primarily uses Firebase Auth Email & Password to authorize my users and manage permissions . There are complex configuration options for the security and access settings that can be individually set for each user . There are also premade roles (e.g. admin, manager, etc.) . However, these are only templates and don't need to be used by the person who manages the user accounts. The permissions can be customized for each user

Want to pass the total price in the bottom navigation bar in flutter

試著忘記壹切 提交于 2021-02-11 15:21:17
问题 How can i show the total amount in the bottom navigation bar... The app uses firebase backend... I have a filed in my database name total price of each item... Now I want to fetch the total price of each item and then add it and display in the bottom navigation bar.. I have attach my firebase backend screen shot.. what i need is to get all the value of the field 'total' add it up and show it in the bottom bar below the Total which is hardcoded as 999 currently section... It would be helpful