firebase

How to update Firebase token in Flutter application after it expires and store it?

筅森魡賤 提交于 2021-02-18 07:25:17
问题 I have created authentication with google on first time start up of app and I have my own _authenticatedUser which stores user token for further requests. final FirebaseAuth firebaseAuth = FirebaseAuth.instance; final GoogleSignIn googleSignIn = GoogleSignIn(); Future<String> signInGoogle() async { GoogleSignInAccount googleSignInAccount = await googleSignIn.signIn(); GoogleSignInAuthentication gsa = await googleSignInAccount.authentication; FirebaseUser user = await firebaseAuth

How to block users on Firebase in a social media app? for iOS

主宰稳场 提交于 2021-02-18 03:41:51
问题 enter image description hereI'm about 90% with my app, and was ready to release it so it can be released to get tested. I was rejected by apple, because i didn't have a very important feature: - A mechanism for users to block abusive users. I already have a function in which I follow other users, but I'm stuck on how do I block access, so that when one users blocks the other, they don't see anything related to the one who just blocked him. They can't see their profile in search, in new

Could not find a declaration file for module 'firebase-tools'

女生的网名这么多〃 提交于 2021-02-18 03:19:41
问题 I am writing my first cloud function for Firebase and it requires the firebase-tools module. I've installing it by adding it to my dependencies in the package.json file and running npm install . Then I tried to import it using import * as tools from 'firebase-tools'; , but I get this error: Could not find a declaration file for module 'firebase-tools'. 'c:/Users/LENOVO/Nouveau dossier/functions/node_modules/firebase-tools/lib/index.js' implicitly has an 'any' type. Try npm install @types

Could not find a declaration file for module 'firebase-tools'

大憨熊 提交于 2021-02-18 03:18:27
问题 I am writing my first cloud function for Firebase and it requires the firebase-tools module. I've installing it by adding it to my dependencies in the package.json file and running npm install . Then I tried to import it using import * as tools from 'firebase-tools'; , but I get this error: Could not find a declaration file for module 'firebase-tools'. 'c:/Users/LENOVO/Nouveau dossier/functions/node_modules/firebase-tools/lib/index.js' implicitly has an 'any' type. Try npm install @types

Could not find a declaration file for module 'firebase-tools'

随声附和 提交于 2021-02-18 03:17:52
问题 I am writing my first cloud function for Firebase and it requires the firebase-tools module. I've installing it by adding it to my dependencies in the package.json file and running npm install . Then I tried to import it using import * as tools from 'firebase-tools'; , but I get this error: Could not find a declaration file for module 'firebase-tools'. 'c:/Users/LENOVO/Nouveau dossier/functions/node_modules/firebase-tools/lib/index.js' implicitly has an 'any' type. Try npm install @types

Firestore transactions getting triggered multiple times resulting in wrong data

南楼画角 提交于 2021-02-17 20:55:15
问题 So I have a cloud function that is triggered each time a transaction is liked/unliked. This function increments/decrements the likesCount . I've used firestore transactions to achieve the same. I think the problem is the Code inside the Transaction block is getting executed multiple times, which may be correct as per the documentation. But my Likes count are being updated incorrectly at certain times. return firestore.runTransaction(function (transaction) { return transaction.get(transRef)

SAML authentication with firebase

最后都变了- 提交于 2021-02-17 20:33:10
问题 Is there a way to authenticate a user with SAML token using firebase as a backend? The company I am working with requires that SAML is used within the authentication system and I am not sure if this is possible with firebase as a backend. Thanks 回答1: Maybe new GCP service "Cloud Identity for Customers and Partners" (in beta for now) could help you. Cloud Identity for Customers and Partners (CICP) provides an identity platform that allows users to authenticate to your applications and services

Using Kotlin Coroutines to replace LocalBroadcastManager for Firebase messaging

£可爱£侵袭症+ 提交于 2021-02-17 19:12:53
问题 When using Firebase Cloud Messaging on Android, it is often desirable to notify the current Activity of an incoming push notification. One of the recommended ways to do this has been to use LocalBroadcastManager to send an Intent from the FirebaseMessagingService implementation to the Activity (StackOverflow example answer). However, as of version 1.1.0-alpha01 (2018-12-17), LocalBroadcastManager is deprecated: LocalBroadcastManager is an application-wide event bus and embraces layer

Firestore - subcollection query for a specific document

喜欢而已 提交于 2021-02-17 15:51:40
问题 Note: Querying across subcollections is not currently supported in Cloud Firestore. If you need to query data across collections, use root-level collections. When I read the documentation for me it's not clear if it's possible to do something like this: var listsRef = db.collection("users/user1/lists"); var query = listsRef.where("public", "==", true); I can understand that it's not supported if I try to do this: var listsRef = db.collection("users/{userId}/lists"); var query = listsRef.where

Can help me to delete data from firebase and recyclerView?

痴心易碎 提交于 2021-02-17 07:14:09
问题 I did recyclerView retrieve data from firebase real-time database, and created button for delete item from recycelerView and from database I have 2 questions 1- after i add new item in recyclerView and then try delete it not delete directly , just when add item and run code again then i can delete it public class WorkerRecyclerViewAdapter extends RecyclerView.Adapter<WorkerRecyclerViewAdapter.ViewHolder> { private Context context; private ArrayList<Worker> workersList; private