firebase-authentication

Android: Retrieve data of a specific user from a Firebase database

时光怂恿深爱的人放手 提交于 2020-01-28 08:05:28
问题 I am trying to read "specific" data from my firebase realtime database. I have seen examples of getting all data from a table and going through it to find the data record you want, but that is definitly not a recommended safe practice. Below is how I save my data private void saveInDatabase(String email) { // Write a message to the database FirebaseDatabase database = FirebaseDatabase.getInstance(); DatabaseReference myRef = database.getReference("user"); String key = myRef.push().getKey();

Android Build execution failed due to incompatible library versions

[亡魂溺海] 提交于 2020-01-26 04:56:39
问题 Implementing Google sign in using firebase. This is my project level build.gradle buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.0.1' classpath 'com.google.gms:google-services:3.0.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { google() jcenter() } } task clean(type: Delete) { delete rootProject.buildDir } This is my App level

iphone/ipad suddenly stops responding to firebase queries

让人想犯罪 __ 提交于 2020-01-26 03:50:14
问题 I am using firebase realtime database in my iOS application. I am using insert into database and find user depending on filter query in my application. It all works fine. Sometimes suddenly my ipad and iPhone stop responding to firebase queries. Many a times it happens that same application runs perfect on one device and doesn't work on other . Or same build when deleted and installed stops working on ipad/iphone. To troubleshoot this I generaly recreate my firebase authentication client id

How do I restrict user sign ups to only certain domains in Firebase?

风流意气都作罢 提交于 2020-01-25 21:38:07
问题 I have an iOS app that I'd like to restrict access to, making it only available to users from a specific email domain. The app requires the users to log in using their Google Account. I've found various answers online that suggested adding ".read": "auth.token.email.endsWith('gmail.com')" But that doesn't seem to return an error in the sign in page, but only when the user in question tries to access the database. Any suggestions? 回答1: You will have to enforce that. You have multiple tools to

An internal error has occured. [ invalid access_token, error code 43. ]

蓝咒 提交于 2020-01-25 20:40:48
问题 When i sign in my APP silently twice with Facebook credential of Firebase,it return this error message. An internal error has occured. [ invalid access_token, error code 43. ] I save the Facebook token in SharedPreferences when first login,and get it when twice login,then create credential with FacebookAuthProvider.getCredential(accessToken); . At last I sign in with this credential using following code: private void signInFirebase(AuthCredential credential, final TaskCompleteListener

How do I properly use onAuthStateChanged from firebase in react native?

对着背影说爱祢 提交于 2020-01-25 09:23:04
问题 I'm a bit confused over the firebase function onAuthStateChanged() . componentDidMount() { fbAuth.onAuthStateChanged(function(user) { if (user) { //THIS TRIGGERS BOTH AT LOGIN AND REGISTRATION console.log("LOGGED IN"); } else { //TRIGGERS WHEN LOGGING OUT; NOT WHEN FAILING TO LOGIN! console.log("LOGGED OUT"); } }); } I thought that the if(user) block triggered when the user has logged in, but the console.log is also triggered when a new account is created. How do I make a conditional that

Android Studio (Kotlin) - User has to log back into app every time app is closed

ぐ巨炮叔叔 提交于 2020-01-25 09:19:09
问题 So i have a RegisterActivity and a MapsActivity . When a new user opens the app, they will be on the RegisterActivity and sign up. Once they sign up, my app creates an Intent and sends them to the MapsActivity The problem is whenever the user closes the app, they have to login/register again. I want the the app to be able to open back to the MapsActivity since the user has not signed out yet Here's my attempt: i put an <intent-filter> in both RegisterActivity and MapsActivity because i think

GameObject.SetActive() inside Firebase Authentication not called

≡放荡痞女 提交于 2020-01-25 09:00:25
问题 I am trying to use Firebase to authenticate users.The following code is called when the user enters the email address and password and logs in.The characters entered by the user are substituted for Email and password respectively. [SerializeField] GameObject Obj; auth.SignInWithEmailAndPasswordAsync(email, password).ContinueWith(task => { if (task.IsCanceled) { Debug.Log("1"); Obj.SetActive(true); return; } if (task.IsFaulted) { Debug.Log("1"); Obj.SetActie(true); return; } Firebase.Auth

I am getting Invalid Dynamic Link when clicking to the Sign-in link received through email

ε祈祈猫儿з 提交于 2020-01-25 08:24:24
问题 I am getting Invalid Dynamic Link when clicking to the Sign-in link received through email. actionCodeSettings.url = URL(string: "https://caxxxxxxxxxxxant.page.link") //my domain prefix actionCodeSettings.handleCodeInApp = true actionCodeSettings.setIOSBundleID(Bundle.main.bundleIdentifier! But when I provide the url as : actionCodeSettings.url = URL(string: "https://caxxxxxxxxxant.page.link/open") with custom url scheme i gave while making Dynamic Link under the domain, it's now navigating

Navigator.push() loses my provider on Firebase Login

…衆ロ難τιáo~ 提交于 2020-01-25 06:41:07
问题 I have having some issues in a Firebase login. I'm trying to make with Provider.The problem is that my login is not refreshing the UI, even thought the data changes and when i hit hot restart it shows me the new UI. Doing some experiments I got into the conclusion that the problem is on a Navigator.push i use to show an animation. I don't wanna lose this animation it gives a pretty cool style to my an app. Is there any way the main provider can can work after a new page is push? Main.dart