firebase-authentication

Android Firebase linking multiple account providers with matching email

允我心安 提交于 2019-12-10 15:57:14
问题 In my firebase dashboard I have set multiple accounts for one email option. I have simple email, Facebook and Google Plus authentication in my application. I handle each of them like this in my LoginActivity: Google Plus: private void firebaseAuthWithGoogle(GoogleSignInAccount acct) { AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null); mAuth.signInWithCredential(credential) .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() { @Override public

Removing Firebase authState upon viewDidDisappear

假如想象 提交于 2019-12-10 15:56:38
问题 I'm using Firebase's new framework and I'm attempting to monitor the login state of the user on both the Login and Signup VC's separately. The problem is if the login state changes on the SignUp view the Auth State on the Login view gets called as well. My question is, how do I remove the auth state? I found the syntax on the Firebase website but am a little confused on what to pass in considering my code for the auth state: FIRAuth.auth()?.addAuthStateDidChangeListener { auth, user in if let

Edit templates Authentication Firebase

半腔热情 提交于 2019-12-10 15:54:58
问题 Hello I start a new app with Firebase and I go to implemente Authentication method, but I need edit template for Email address verification and Change email address. This two options can't be edited, but on reset password can edit template (field: message). The message are blocked only on options (Email address verification and Change Email address)? I working on one app on Spanish and I really need edit this template. 回答1: As it says when you hover over the question mark icon: "To help

Prevent multiple devices from using the same Firebase account through Swift

最后都变了- 提交于 2019-12-10 15:54:49
问题 I'm building an iOS app using Swift and Firebase for authentication that needs to avoid multiple connections of the same account from different devices. I've read some other posts on here but haven't found a definitive answer as to why this isn't working. I first tried checking to see if the current user is nil with the below code (which always shows nil due to async calling). if Auth.auth().currentUser == nil { // ... } I also tried using the addStateDidChangeListener() callback function in

Check if user is logged in or not using firebase in react

左心房为你撑大大i 提交于 2019-12-10 15:47:07
问题 I do have a react with firebase project. So I successfully able to login the user via firebase authentication. What I want to do is to set the user details in all pages. I thought, I can able to access the user variables in react everywhere like laravel's Auth::user() . But I tried in so many ways to achieve that. But I couldn't able to get the user details in another page. Is there any way to get the user details in another page ? My signin.js page . handleSubmit = (e) => { e.preventDefault(

How to create collection in Cloud Firestore from Javascript?

℡╲_俬逩灬. 提交于 2019-12-10 15:20:59
问题 When user creates account in my angular app, my app creates user account (using Firebase API) with email and password. But also I want to create new collection to hold more data like name, surname... Each collection's name will have uid. But I don't know how to force it? db.createCollection('abcXdefX') doesn't exist. I've no idea what to do. Please, help. 回答1: You cannot create empty collection, you have to create document inside. data model function writeUserData(userId, name, email,

Firebase Auth+Functions | create user with displayName

女生的网名这么多〃 提交于 2019-12-10 15:10:09
问题 I tried to create a user with displayName. It actually works if I update the user profile after creation. BUT I also use a cloud function auth.onCreate where I need the displayName. But event.data doesn't give me the displayName. I guess it's because when the cloud function is triggered, the profile isn't updated. Any idea how I can get access to the displayName in my cloud function? The reason why I try to do this is because I wanna make sure that displayNames are unique. So when people

Facebook Login works only from API 24 - Local module descriptor class for com.google.firebase.auth not found. error

吃可爱长大的小学妹 提交于 2019-12-10 14:56:50
问题 I added facebook login with firebase authentication on my application, but the login authentication works only from the Android API 24. When I try to use a lower level API the screen freezes and the application stops working. It is too high, most of the users have a lower API level. Indeed I intend to release the application for lower API levels. The code I am using is bellow. public class ConfigurationActivity extends Activity { Button b_v_mm,b_som; LoginButton loginButton; CallbackManager

Firebase do not create user in Unity SDK

六月ゝ 毕业季﹏ 提交于 2019-12-10 13:56:18
问题 It is strange that Firebase can't create user in Unity SDK out of the box. Firebase Console was tuned (anonymous access and email/password access are enabled) and google-service.json was placed in Assets folder of Unity. However, Firebase still won't create a user. This is the code where it always fails: auth.SignInAnonymouslyAsync().ContinueWith(task => { if (task.IsCompleted && !task.IsCanceled && !task.IsFaulted) { Debug.Log("User is now signed in."); FirebaseUser newUser = task.Result; }

How to check if a user is signing in for the first time with Firebase Authentification

江枫思渺然 提交于 2019-12-10 13:39:29
问题 I am using Firebase Database, and Firebase Authentication, allowing user to sign in with Email/password or Google Sign-in. In the login activity I am trying to check if the user signing in with Google, is doing it for the first time or no. If it is the first time that he is signing a dialog box shows up and requests the user's age and gender; if not the dialog box shouldn't appear. The problem I am having is that the Dialog box always appears if the user signs in with Google, regardless if it