firebase-authentication

Cloud Firestore rules - Allowing anybody to update one specific field in a document

余生长醉 提交于 2020-03-05 01:29:17
问题 I'm working on a PoC (Proof of Concept) application that users can download wallpapers to their device. All of the data is served using Cloud Firestore & Storage. There is NO LOGIN for this application. Anybody can download the application, and immediately download the wallpapers she or he desires. Bearing that in mind... I would like to have a counter that tracks how many times each specific wallpaper was downloaded. While I have it "working" - I am questioning the rules I have set up in

Firebase authentication (email/password) how to set user's uid?

强颜欢笑 提交于 2020-03-03 04:28:02
问题 I am authenticating using email/password like so: firebase.auth().createUserWithEmailAndPassword(email, password).catch(function(error) { // Handle Errors here. }); And listening to auth here: firebase.auth().onAuthStateChanged(function(user) { if (user) { // User is signed in. console.log(user); } else { // No user is signed in. console.log("Not signed in"); } }); Which works fine. On examining the user object that auth returns, the uid is a random string, is there a way to set this uid when

angular + firebase auth + material = router crashes

人走茶凉 提交于 2020-03-03 02:49:50
问题 The router is not working properly after firebase authentication. The problem is comming from @angular/animations, both importing NoopAnimationsModule or BrowserAnimationsModule the router doesn't work properly package.json "dependencies": { "@angular/animations": "^5.2.8", "@angular/cdk": "^5.2.4", "@angular/common": "^5.2.0", "@angular/compiler": "^5.2.0", "@angular/core": "^5.2.0", "@angular/forms": "^5.2.0", "@angular/http": "^5.2.0", "@angular/material": "^5.2.4", "@angular/platform

angular + firebase auth + material = router crashes

那年仲夏 提交于 2020-03-03 02:49:45
问题 The router is not working properly after firebase authentication. The problem is comming from @angular/animations, both importing NoopAnimationsModule or BrowserAnimationsModule the router doesn't work properly package.json "dependencies": { "@angular/animations": "^5.2.8", "@angular/cdk": "^5.2.4", "@angular/common": "^5.2.0", "@angular/compiler": "^5.2.0", "@angular/core": "^5.2.0", "@angular/forms": "^5.2.0", "@angular/http": "^5.2.0", "@angular/material": "^5.2.4", "@angular/platform

Monitor Firebase Auth Object property changes?

青春壹個敷衍的年華 提交于 2020-03-01 10:11:41
问题 I've implemented by own email verification process using Firebase Auth and Firestore as I needed to use custom email templates. Client side, the UI is done with React. The process is as follows: 1) User registers and I call firebase.auth().createUserWithEmailAndPassword() 2) My Cloud Function listens for when a new user is created using functions.auth.user().onCreate() . It generates a record in Firestore using their UID as the doc ID, and sets a token and creation time. 3) The user clicks

In firebase authentication, is there a way to remove a custom claim?

混江龙づ霸主 提交于 2020-02-28 05:57:05
问题 In order to set a custom claim, one uses: admin.auth().setCustomUserClaims(uid,{claim:value}); There does exist admin.auth().updateUser(uid,{claim:value}); ...but I'm not exactly clear on how the two are different, and neither one seems to get at actually removing a previously applied custom claim. 回答1: From the documentation: You can delete a user's custom claims by passing null for customClaims . So this should delete the claim: admin.auth().updateUser(uid, {claim: null}); 回答2: I don't

Firebase dynamic link invalid and blocked

99封情书 提交于 2020-02-25 07:05:13
问题 I’ve implemented firebase email authentication in iOS. I’ve tested the functionality on 4 different iPhones, all running iOS 13.3.1, and it works in half of them and not in the other. For the half that don’t work, I receive an error message stating “Invalid Dynamic Link - Blocked”. I’m performing the same process on all iPhones and am connected to the same WiFi. I’m trying to understand what would cause this to happen? It’s clearly something on the phone that is preventing it from segueing

How to restrict user to use specific domain to sign up my app using firebase [duplicate]

醉酒当歌 提交于 2020-02-23 07:11:07
问题 This question already has answers here : How to disable Signup in Firebase 3.x (4 answers) Closed 2 years ago . I'm currently developing an app for my university using Ionic 2 and Firebase. So, the problem is how to restrict user from signing up unless they're using specific domain eg.(@ukm.edu.my)? It's for my university, I don't want anyone else to use this app. So, anyone without that specific email domain can't sign up for my app. From what I've read, Firebase database rules only affect

AngularFire2 Authentication Error: First argument “email” must be a valid string

最后都变了- 提交于 2020-02-23 04:36:28
问题 I am trying to make login and signup forms for my web app using angularFire2 and Firebase. I am getting an error when taking a users signup information and passing it into the signInWithEmailAndPassword function. signInWithEmailAndPassword failed: First argument "email" must be a valid string. I have everything in my component that deals with the email variable typed as a string and it logs to the console as a string so I am not sure exactly what is going on. I have researched for almost 3

How do you link firebase accounts in firebase_auth 0.11.1 in flutter?

假如想象 提交于 2020-02-22 09:45:25
问题 I've successfully implemented Google and Facebook sign ins for Flutter using firebase_auth 0.11.0. I need to implement the linking account feature for accounts that have the same email address. Future<FirebaseUser> _signInWithGoogle() async { final GoogleSignInAccount googleUser = await _googleSignIn.signIn(); final GoogleSignInAuthentication googleAuth = await googleUser.authentication; final AuthCredential credential = GoogleAuthProvider.getCredential( accessToken: googleAuth.accessToken,