firebase-authentication

How to do CRUD operations in Firebase with CurrentUserId?

可紊 提交于 2019-12-12 01:09:47
问题 I'm creating a simple website and i'cant use firebase realtime databases crud operations with currentUserId. My auth system working good; i can signIn/signUp/signOut on database. And i can write data to firebase with getting inputs from form. //GETTING DATA WITH FORM // Listen for form submit document.getElementById('form').addEventListener('submit', submitForm); // Submit form function submitForm(e){ e.preventDefault(); // Get values var name = getInputVal('name'); var sets = getInputVal(

Android app crashes on firebase phone authentication

こ雲淡風輕ζ 提交于 2019-12-12 00:58:10
问题 I am using firebase for phone number authentication.When I used my phone number, it automatically verifies it.But when I use another phone number I get classCastException .It says "getGoogleApiForMethod() returned Gms" .There is a similar problem in stackoverflow Link.The answer was to downgrade firebase or google play services in phone or emulator.I have included gradle as well below.Please check it Exception: W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com

How Firebase Auth UID is generated?

☆樱花仙子☆ 提交于 2019-12-12 00:43:04
问题 I use custom authentication using JWT Token. The login process is like this: The user input his/her phone number They will get SMS confirmation containing 4-digit-code that they need to enter The user enter the digits, and the verification success. The app now is processing the login. Mobile app request a JWT Token from our server, the server combine phoneNumber into the token. After getting the token, it uses FIRAuth.auth()?.signInWithCustomToken(customToken) In the Firebase rules, auth is

Apparent race condition getting firebase.User from controller in Firebase 3.x

牧云@^-^@ 提交于 2019-12-12 00:42:00
问题 I'm using Firebase 3.x and the auth state change event to assign the current user in my service - .service('FireService', function ($q, $http,$state) { var accessToken; var user; firebase.auth().onAuthStateChanged(function (usr) { if (usr) { // User signed in! user = usr; } else { user = null; $state.go('login'); } }); return { currentUser: function () { return user; } } But I need the current user to a reference to my child objects from the database in the controller var getLog = function ()

FirebaseAuth.getInstance().getCurrentUser() returns previously logged out user

徘徊边缘 提交于 2019-12-12 00:06:36
问题 I have Android app which uses FirebaseAuth and FirebaseDatabase functionalities. Everything was working fine. During last week I was working with one user (user 1) as an admin of the app and yesterday I registered another user (user 2) as a normal user(not admin). Since all my admin functionalities were working fine, I never logged in as the user 1 again. However I had to uninstall my app today and by that time I was logged in as user 2. When I reinstalled it again, I was automatically logged

How to prevent user authentication in Firebase/Vue.js BEFORE email is verified

南楼画角 提交于 2019-12-11 23:30:06
问题 I am building a Vue.js/Firebase authentication interface that includes an email verification component. So far, I have been able to successfully set up my interface so that the user is prevented from logging in until he/she clicks the verification link in the email sent to the inbox tied to the inputted address. I am noticing, however, that the email address still renders in the Firebase authentication portal, even BEFORE clicking the link in the verification email. This also seems to be the

Is it safe to use Firestore and its features via client only? [duplicate]

蹲街弑〆低调 提交于 2019-12-11 19:55:41
问题 This question already has an answer here : Why is it okay to allow writes into Firebase from the client side? (1 answer) Closed 6 months ago . If I use the prod environment variables in my App and set the server side rules for Firestore, would my app be completely secure to perform CRUD and authentication? I am asking this because I have been seeing Angular tutorials by pretty famous YouTube content creators (Fireship) and they do not touch server side code and still show how to make a

ref.$authWithPassword is not a function in Firebase

喜你入骨 提交于 2019-12-11 19:45:27
问题 One of these days where one bug follows the other jeezzz... So much for using firebase as an easy data source for my apps. I was just about to start implementing $firebaseSimpleLogin when it broke and I found out though stackoverflow that it was deprecated in favour of $firebaseAuth . However, now I am unable to update the function in the controller because it throws the same error time and time again: TypeError: ref.$authWithPassword is not a function I have added all the dependencies to my

Cannot generate correct facebook key hash for release apk?

青春壹個敷衍的年華 提交于 2019-12-11 19:16:11
问题 Steps that I've tried, 1) Generated the keyhash (although i got a warning/error as "keytool: command not found") from the official developer documentation.( keytool -exportcert -alias YOUR_RELEASE_KEY_ALIAS -keystore YOUR_RELEASE_KEY_PATH | openssl sha1 -binary | openssl base64 ) 2)Also tried the the keyhash shown in the error message while signing in. Still, none of the above keyhashes worked, interesting i was successfully able to signin to facebook in my debug version. Please Help 来源:

I want to retrieve the data that is generated by the user but getting permission denied error in Firebase

﹥>﹥吖頭↗ 提交于 2019-12-11 18:51:53
问题 Rule written for dummyOrders: "rules": { "dummyOrders":{ "$dummyid":{ ".write": "auth!=null && $dummyid.contains(auth.uid)", ".read": "auth!=null && $dummyid.contains(auth.uid)" } } Structure of dummy orders: -LLKkP5GLMkMqy-OvFsY|3wvZGffGY5gUSKlFzhLw7hwXLEi1 cemail: "nateshmbhat1@gmail.com" cid: "NKGiiChIqCdUcithC48mtuWkaAt1" cname: "Natesh Bhat" date: "2018-09-01T15:31:25.060Z" file_names: "JavaEvaluation.doc," message: "Sample testing. " oid: "Order 230" status: "requested" xid: