firebase-authentication

Handle asynchronous authentication in Firebase on page reload to get list that needs user's uid

谁说胖子不能爱 提交于 2019-12-25 04:21:23
问题 Using Angularjs. How do you handle the situation where a person reloads a page and the controller tries to query Firebase using the current user's uid before the Firebase auth event is triggered and has a chance to set the current user? Details: The Firebase query require's the user's uid and everything works when navigated to the route via $state.go('/list') But when a person reloads the page the controller checks for the user which doesn't exist until this event handler fires: auth

Handle asynchronous authentication in Firebase on page reload to get list that needs user's uid

女生的网名这么多〃 提交于 2019-12-25 04:20:36
问题 Using Angularjs. How do you handle the situation where a person reloads a page and the controller tries to query Firebase using the current user's uid before the Firebase auth event is triggered and has a chance to set the current user? Details: The Firebase query require's the user's uid and everything works when navigated to the route via $state.go('/list') But when a person reloads the page the controller checks for the user which doesn't exist until this event handler fires: auth

PassworLess email auth

北慕城南 提交于 2019-12-25 02:45:18
问题 I have done the passwordLess email authentication. And I got the link. Now when I redirect to my app. I needs to update the user to firebase authentication. And if its success allow them to go inside my app. Same time needs to get the current logged userid. Here is the code is used: logic is : Consider I am an new user login in with email Consider I already logged in with my gmail account. And also authenticate already to firebase. If I am using same email address. I will get some error. I am

Can i use this claim in firebase database security rules?

只谈情不闲聊 提交于 2019-12-25 01:43:45
问题 I have use this firebase to set a custom claim const functions = require('firebase-functions'); const admin = require('firebase-admin'); admin.initializeApp(); exports.sellerCustomClaim = functions.database.ref('/Users/{userNumber}') .onCreate((data, context) => { const sellerNumber = context.params.userNumber; const uid = context.auth.uid; const customClaims = { number: sellerNumber, }; console.log(`Uid: ${uid}, number: ${sellerNumber}`); console.log(`before Seller number: ${sellerNumber}`);

firebase auth phone not send sms to user that already aunthenticated

回眸只為那壹抹淺笑 提交于 2019-12-25 01:39:55
问题 I'm trying to implement phone auth with firebase in react-native app. I just see that if user already signed up with phone number (exist in Authenticated table in firebase console) and he sign out and want to sign up again with the same phone, I don't get sms code again. I get verificationId null and it throws the errow TypeError: Cannot read property 'length' of null in this line of code {started && auto && !codeInput && !codeInput.length ? this.renderAutoVerifyProgress() : null} my full

onActivityResult for createSignInIntentBuilder() not called when invoked in landscape mode

不想你离开。 提交于 2019-12-25 01:37:33
问题 My entire project was built in Portrait mode with all my activities set with the following option in the AndroidManifest.xml: android:screenOrientation="portrait" However, as setting orientation on FirebaseUI is not possible (as described here), there is a chance for users to SignIn in Landscape mode. When this happens, onActivityResult is never called: public void createSignInIntent() { // [START auth_fui_create_intent] // Choose authentication providers List<AuthUI.IdpConfig> providers =

How To Fetch Error Code From Firebase?

旧街凉风 提交于 2019-12-25 01:36:00
问题 Auth.auth().signIn(withEmail: emailTextField.text!, password: passwordTextField.text!) { (user, error) in if error != nil { print(error!) self.warningLabel.isHidden = false; self.passwordTextField.text = ""; } else { print("Log in succesful") self.performSegue(withIdentifier: "welcomeSeg", sender: self) } } Whenever I sign in or sign up a user I just print a generic warning label instead of the actual issue. I print the error I receive and it's too verbose to show to the user. Error Domain

Where is podfile in flutter for phone firebase auth?

↘锁芯ラ 提交于 2019-12-25 01:05:03
问题 I am trying to set up phone authentication with firebase. Inside firebase guidelines there is this part for iOS from here https://firebase.google.com/docs/auth/ios/phone-auth Include the following pods in your Podfile: pod 'Firebase/Auth' But I cannot find Podfile in my app directory. How to achieve this? 回答1: I had to run the app on iOS Simulator once. Then the Podfile was created in ios/Podfile 来源: https://stackoverflow.com/questions/50633061/where-is-podfile-in-flutter-for-phone-firebase

How to save, with anonymous authentication, to Firebase database - using Flutter

梦想的初衷 提交于 2019-12-24 23:16:08
问题 I'm getting permission denied after I have authenticated with Anonymous Auth [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception: E/flutter (21033): PlatformException(-3, Permission denied, ) ... _getCurrentUser: FirebaseUser({providerId: firebase, uid: DOIL...............u54j1, displayName: , email: , isAnonymous: true, isEmailVerified: false, providerData: [{providerId: firebase, uid: DOIL//////////////54j1, displayName: , email: }]}) My rules on the Firebase DB are {

Retrieve Current User's Data (user_id) Firebase?

无人久伴 提交于 2019-12-24 22:04:34
问题 firebaseAuth = FirebaseAuth.getInstance(); mDatabase = FirebaseDatabase.getInstance(); mDb = mDatabase.getReference(); FirebaseUser user = firebaseAuth.getCurrentUser(); userKey = user.getUid(); mDb.child(userKey).addValueEventListener(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { Log.d(TAG, "Name: " + dataSnapshot.child("user_id").getValue()); userID = String.valueOf(dataSnapshot.child("user_id").getValue()); } @Override public void onCancelled