firebase-authentication

How to secure Firebase account etc. from user actions?

天大地大妈咪最大 提交于 2019-12-23 03:36:10
问题 I am developing a hobby project using Firebase and some Node.JS running on Google App Engine as backend. I am a real newbie in this area, and also just hear about Firebase a month ago. My question relates to how various "things" can be secured from user actions, even though Firebase is running as JS on client-side. I am aware that the DB and Storage can be secured using logical rules - that is in place. My question rather concerns the actions an user can perform with firebase.auth() and

Ioniv-v4 : ionic cordova plugin add cordova-plugin-googleplus Not working

拟墨画扇 提交于 2019-12-23 02:59:06
问题 This (cordova-plugin-googleplus) command is not working with IONIC-v4-BETA, please help on this issue, details mentioned below. Command ionic cordova plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=REV_KEY COMMAND ERROR PS C:\ROOT\yaflix\Source\DEV\yaflix> ionic cordova plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=com.googleusercontent.apps.**************************************** > cordova plugin add cordova-plugin-googleplus --variable REVERSED

Changing User Email and Password with Swift and Firebase

别说谁变了你拦得住时间么 提交于 2019-12-23 02:49:07
问题 Here's my edit button for an iOS application with swift and firebase. var ref = Firebase(url:"https://·············.firebaseio.com") @IBAction func Done(sender: AnyObject) { ref.changeEmailForUser("users/\(self.ref.authData.uid)/email", password: "users/\(self.ref.authData.uid)/provider", toNewEmail: EmailTextField.text) { (ErrorType) -> Void in if ErrorType != nil { print("There was an error processing the request") } else { print("Email changed successfully") } } ref.changePasswordForUser(

Send User Password via Email with Firebase

主宰稳场 提交于 2019-12-23 02:32:48
问题 I am creating a android application where I'm using firebase auth but I don't want to send the confirmation email to user for confirming the user email address, instead I want to set a auto generated password for the user and send it to the users email so by that way I can verify his email. Just wanted to know if it is possible or not, if yes then link to any guide or tutorial will be great. Thanks 回答1: Yes, it is possible. When user creates his account send a auto generated password on his

How to update phone number on Firebase Authentication in NodeJS?

情到浓时终转凉″ 提交于 2019-12-23 02:28:09
问题 I have implemented Firebase phone authentication to verify the phone number in my project, But my problem is how to update the mobile number on auth. Like if a user had logged in with phone number A and this user lost his phone number, so the user needs to update the phone number A to B. it would be possible to replace the phone number from authentication or any other way around? this is what i did..based on the answer below. router.post('/replacenumber', function (req, res) { var user_id =

How to send email verification code to user email in firebase

僤鯓⒐⒋嵵緔 提交于 2019-12-23 02:21:03
问题 I want to send email verification code to user's email using firebase authentication. I am using (sendEmailVerification) method but firebase sends a verification link to user's email. Is it possible to send verification code to user's email if yes then how it can be done? I am using Angular 4 and for firebase angularfire2 Thanks. 回答1: If don´t want to use the solution provided by firebase, you have to handle all the process yourself and then update the user emailVerified data to true . The

Stream removed error in Firebase Functions

对着背影说爱祢 提交于 2019-12-23 01:54:51
问题 I have a function that runs on the creation of a new user. The function typically fails on the first call after not being called for a while. I'm hoping someone could help me figure out what could be causing this. export const onUserCreate = functions.auth.user().onCreate(event => { const user: User = { userId: event.data.uid, email: event.data.email }; return db.doc(`users/${user.userId}`).set(data); }); 回答1: As I use the same like below and it works well: exports.onUserCreate = functions

Rule for Firestore that enforce user to write a document with id equals to its own uid

隐身守侯 提交于 2019-12-22 19:47:11
问题 I would like to guarantee that an user can only add a document that has the same id that its auth.uid. For example, an user with id 1X0T6xC6hhRN5H02zLCN6SQtwby2 can only create/update the document /salesmen/1X0T6xC6hhRN5H02zLCN6SQtwby2 . At app level, it's done by the following command (both for create and update). this.db .collection("salesmen") .doc(user.uid) .set(data) .then(function() { //... At Firestore level, I am trying the following rule, but it's not working (it results in Error

How can I verify a method is run in a mocked class's callback?

爱⌒轻易说出口 提交于 2019-12-22 18:46:15
问题 I have a utility class in my Android code that handles the authentication of users. I'm writing unit tests for this class with Mokcito to verify that a listener is being notified if the creation of a new user had succeeded or failed. Here is one of this utility class's methods: public void createNewUser(String email, String password) { firebaseAuth.createUserWithEmailAndPassword(email, password) .addOnSuccessListener(authResult -> { authListener.newUserCreated(); }) .addOnFailureListener(e ->

How to implement an image popup in jquery for firebase

蹲街弑〆低调 提交于 2019-12-22 18:36:45
问题 I am in a bit trouble as I don't know how to implement the image popup in jquery for firebase. I have searched it on the internet but did not find the way how to implement it for the dynamic websites. I am having the following jquery code, can anyone help? I haven't found anything on stackoverflow also regarding this. this is my html code <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale