firebase-authentication

Persist user on App Reinstall with Firebase

断了今生、忘了曾经 提交于 2020-04-11 07:42:51
问题 When a user deletes and reinstalls my app, I want their anonymous user account to persist. My iOS app is working as expected, but Android is not. I create anonymous users like so if (auth.getCurrentUser() == null) { auth.signInAnonymously().addOnCompleteListener(task -> {}); } When I delete the app and reinstall, auth.getCurrentUser() is null and I have to re-authenticate. My AndroidManifest.xml contains android:allowBackup="true" 回答1: It is null becase Firebase Anonymous Authentication

Persist user on App Reinstall with Firebase

穿精又带淫゛_ 提交于 2020-04-11 07:42:18
问题 When a user deletes and reinstalls my app, I want their anonymous user account to persist. My iOS app is working as expected, but Android is not. I create anonymous users like so if (auth.getCurrentUser() == null) { auth.signInAnonymously().addOnCompleteListener(task -> {}); } When I delete the app and reinstall, auth.getCurrentUser() is null and I have to re-authenticate. My AndroidManifest.xml contains android:allowBackup="true" 回答1: It is null becase Firebase Anonymous Authentication

How to remove Phone Number from user account in firebase?

杀马特。学长 韩版系。学妹 提交于 2020-04-11 04:12:29
问题 I'm guessing you have to do something with re authing to remove the phone number because at the moment I am trying to do this: const user = firebase.auth().currentUser; user.updateProfile({phoneNumber: null}).then(() => { alert('success') }).catch(err => {alert(err)}) this is not working, but I am getting the success block 回答1: To remove a phone number account from a user, simply unlink it: firebase.auth().currentUser.unlink(firebase.auth.PhoneAuthProvider.PROVIDER_ID); 回答2: As stated on the

How to remove Phone Number from user account in firebase?

断了今生、忘了曾经 提交于 2020-04-11 04:12:07
问题 I'm guessing you have to do something with re authing to remove the phone number because at the moment I am trying to do this: const user = firebase.auth().currentUser; user.updateProfile({phoneNumber: null}).then(() => { alert('success') }).catch(err => {alert(err)}) this is not working, but I am getting the success block 回答1: To remove a phone number account from a user, simply unlink it: firebase.auth().currentUser.unlink(firebase.auth.PhoneAuthProvider.PROVIDER_ID); 回答2: As stated on the

How to connect Dialogflow to Cloud Firestore via the Inline Editor in Dialogflow?

孤街醉人 提交于 2020-04-11 02:14:11
问题 I have a Cloud Firestore database that stores the number of inhabitants of all cities in England in 2017. Then I have a Dialogflow. Whenever I tell the name of a city to Dialogflow, I want it to get the number of inhabitants in that city from Firestore and return it to Dialogflow. Specifically, I want to implement this via the Inline Editor. Question : What lines of code do I need to add to the code below in order to make this happen? So here is the code that I write in the Inline Editor in

Android Studio - Get Firebase token from GetIdToken

有些话、适合烂在心里 提交于 2020-04-10 08:26:29
问题 I have done the following in Swift: let currentUser = Auth.auth().currentUser currentUser?.getTokenForcingRefresh(true) {idToken, error in if let error = error { // Handle error print("error (below)") print(error) return; } print("idToken = " + idToken!) // token looks like this: kpJhbGRiOiJSUzI1NiIsIntpZCI9Ijg0MjIuYzc3NTWkOWZmTjI3OBQxZTkyNTpkNWZjZjUwNzg2YTFmNGIifQ.eyJpc3MiOiJodHRwczovL3NlY3Vy... (it's really long) //..do stuff with token } I am now trying to do the equivalent for Android.

Flutter Firebase Auth Anonymous currentUser() returns null

寵の児 提交于 2020-04-10 06:38:21
问题 We have developed and tested a Flutter app. Everything works as expected. We deployed an app to stores and gain some users. After a few months, we got complaints from our users that they lost all their data when they opened the app. I believe that the data is not lost, only their anonymous account changed to the new anonymous account. What users, with lost data, have in common: iOS devices (not sure if relevant), didn't use the app for at least a few days. Our user authentication flow: App

Flutter Firebase Auth Anonymous currentUser() returns null

时光总嘲笑我的痴心妄想 提交于 2020-04-10 06:36:38
问题 We have developed and tested a Flutter app. Everything works as expected. We deployed an app to stores and gain some users. After a few months, we got complaints from our users that they lost all their data when they opened the app. I believe that the data is not lost, only their anonymous account changed to the new anonymous account. What users, with lost data, have in common: iOS devices (not sure if relevant), didn't use the app for at least a few days. Our user authentication flow: App

Firebase not sending OTP

混江龙づ霸主 提交于 2020-04-10 05:07:06
问题 I had registered a user in firebase using Firebase phone number authentication .For testing that functionality again, I deleted the user account from Firebase console. Now, i am trying to register that number again, its directly going to the onVerificationCompleted() callback without sending the OTP .But the user account is not shown in Firebase console. Please help. Code given below. Also please note that its sending OTP to the new numbers .But not sending OTP to the number which i deleted

Flutter - firebase_auth updateProfile method is not working

廉价感情. 提交于 2020-04-10 02:54:56
问题 I'm creating app using Flutter with Firebase. I have some weird issues. I'm creating authentication and it is working fine but when i try to add some collections to my Firestore Database, the record of displayName is set to null. Future<FirebaseUser> createUser(email, password, displayName) async { final FirebaseUser user = await _auth.createUserWithEmailAndPassword( email: email, password: password); UserUpdateInfo info = new UserUpdateInfo(); info.displayName = displayName; _auth