Posts by Paulo Busato Favarato • 159 points
25 posts
-
0
votes1
answer13
viewsA: Firebase Rules - Just my website Read and write data
If you do not have any type of authentication there is no way to ensure by (via the access rules of rtdb) access by any external client. There are some ways you can work around that I have in mind.…
firebaseanswered Paulo Busato Favarato 159 -
0
votes1
answer16
viewsA: The app closes when the user leaves the account
try like this: button5.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { FirebaseAuth.getInstance().signOut(this).addOnCompleteListener(new…
-
0
votes1
answer14
viewsA: Search for no results in the Firebase database
there is an error in the "Names chaining" eventually you don’t even need to use Reject or resolve unless you want to customize the error. I prefer to simply return the value. const getUserProfile =…
-
0
votes2
answers34
viewsA: Travel variable keeps at 1 in the Firebase database, when button is pressed, instead of adding 1 more to the database
you can use the following method to incremantar 1 automatically by the database. firebase.database.ServerValue.increment(1)
-
0
votes2
answers26
viewsA: How to control setValidators in angular?
do not use Controls. use like this: this.criteria.get('discount').get('percentage').setValidators([Validators.required]);
-
0
votes1
answer51
viewsA: True or False button in Angular
My component export class MyComponent { itemPath = 'botoes/1'; private itemDoc: AngularFirestoreDocument<Botao>; item$: Observable<Botao | undefined>; constructor(afs: AngularFirestore)…
-
1
votes1
answer44
viewsA: I want to take the value of . getDownloadURL()
Its function is an asynchronous function. There is no way to return a string, only a Promise async function upImage(nomeDaPlanta, imgFile) { var file = imgFile.files[0]; return storageRef…
-
0
votes1
answer23
viewsA: How to cancel the upload of a file in the firebase web Storage?
first you can check if the file already exists. const storageRef = firebase.storage().ref(); const fileRef = storageRef.child('img-tour/' +files[0].name); fileRef.getDownloadURL().then(function(url)…
-
0
votes2
answers53
viewsA: By doubling the value returned when running onDataCahage in FIREBASE, can you help me?
I don’t quite understand the code and its intent. But there are some details you need to know about the Realtime Database. Note that you are initially creating a "moverRef" system so any modified…
-
1
votes1
answer27
viewsA: Loading in Angularfireauthguard
there is no standard way to do this by angular routing. One thing you can do is a loading component that loads and checks things. and redirects to the target screen using router.navigate (this…
-
0
votes1
answer60
viewsA: Firebase cloud firestore random query with specific user ID (Flutter)
I found something about it but it’s very complex: https://stackoverflow.com/questions/46798981/firestore-how-to-get-random-documents-in-a-collection or try to retrieve the entire collection and…
-
0
votes1
answer24
viewsA: Check for Firebase node
try using firebase increment. movimentacaoSaldoMensalRef = firebaseRef.child("saldoMensal") .child(idUsuario) .set(firebase.database.ServerValue.increment(valor)) this method increments if the node…
-
0
votes1
answer259
viewsA: How to get id of data created in Firebase
when you create uses the push() method in a database reference it returns a new reference that has a . key field soon const sessioRef = firebase.database().ref('sesion').push(); const codigo =…
-
0
votes2
answers252
viewsA: Delete firebase firestore collections
I have an angled application with angularfire. I created this way to delete the collection: deleteCollection(path: string, batchSize: number): Observable<any> { const source =…
-
0
votes1
answer30
viewsA: currentUser firebase is returning null
hard to say only with this code. probably there is something wrong with the authentication of the second app. remembering that as soon as we reload the page firebase.auth().currentUser.uid is…
-
0
votes1
answer97
viewsA: Add values in Firebase Realtime Database
There are some ways around this problem. If you only need to show the total locally at the time of the query and not separately on another page. you do not need to update and read the database. just…
-
0
votes2
answers194
viewsA: Sending e-mail with Nodejs and nodemailer
const transporter = nodemailer.createTransport({ service: 'gmail', auth: { user: '[email protected]', pass: 'senha', port: 587, secure: true, } }); …
-
1
votes1
answer31
viewsA: Execution of external script(js) on an online page
you can use the Chrome Tampermonkey plugin https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=pt-BR with it you can create own scripts and program them to run…
-
0
votes1
answer113
viewsA: Delete firebase user from database and authentication
I can’t believe this is gonna work. when using the currentUser.delete() method it depresses from firebase auth and thus does not need signOut manually. when undoing you lose the auth token and also…
-
0
votes1
answer61
viewsA: Unsubscribe in Observable with Firebase
I didn’t really understand much in what situation you would like to cancel the valueChanges subscription when deleting the same document. does not make sense because when it happens it does not…
-
2
votes2
answers60
viewsA: Express - Suggested experience, how to handle this type of code repetition
[username,password,email,fullName,birthDate].forEach(key => { if (!req.body[key]) { return res.json({error: `${key} not found`}) } });
-
1
votes1
answer39
viewsA: What rule can I use to gain admin access to Firebase?
you can use: service cloud.firestore { match /databases/{database}/documents { match /{document=**} { allow read, write: if request.auth.email == seu_email } } } however I recommend using…
-
0
votes2
answers66
viewsA: Python - Create dynamic variable for firebase
I don’t know much about how the python api works and I don’t know if it’s the Realtime database or the firestore. in the firestore, when performing a very large amount of records and recommended to…
-
0
votes2
answers65
viewsA: How to make a filter with != or Isnotiqualto in the Firestore?
It is now possible to use the "not Equal" query in the firestore. basically use collection('colecao').where('campo', '!=', 'valor'); read more on:…
-
0
votes1
answer44
viewsA: Firebase: updatePassword() does not work
assuming that it will perform its function when the user is logged in: don’t use onAuthStateChanged() to recover the user because it only recovers the user when there are login, logout and token…