草庐IT

signInWithEmailAndPassword

全部标签

javascript firebase.auth().signInWithEmailAndPassword 无法获得成功事件

我在我的应用程序中使用java-scriptfire-base。我能够在应用程序中成功createUserWithEmailAndPassword。它还显示Fire-baseConsole中的数据。这是片段。firebase.auth().createUserWithEmailAndPassword("abc@gmail.com","*******").catch(function(error){//HandleErrorshere.varerrorCode=error.code;varerrorMessage=error.message;console.log("EroorMsg"+

javascript - Firebase 应用的 Mocha 单元测试

我使用firebase3.3.0,我想使用signInWithEmailAndPassword在我的mocha单元测试中运行,但出现错误auth/network-request-failedUnhandledrejectionError:Anetworkerror(suchastimeout,interruptedconnectionorunreachablehost)hasoccurred.test.jsconstFIREBASE_CONFIG={apiKey:"AIzaSyDdA1POUWy9eid1AdBYuMdxch_k8ob7Qrg",authDomain:"my-app.f

android - NullPointerException FirebaseAuth signInWithEmailAndPassword

我将我的FirebasesignInWithEmailAndPassword()方法从我的登录Activity中移到了一个单独的网络包/类中。我已使用createUserWithEmailAndPassword()方法完成此操作,它按预期工作。但是,signInWithEmailAndPassword()方法会抛出一个java.lang.NullPointerException:Attempttoinvokevirtualmethod'com.google.android.gms.tasks.Taskcom.google.firebase.auth.FirebaseAuth.signI

firebase - 如何从 firebase_auth 测试 "signInWithEmailAndPassword"

我正在尝试在我的Flutter应用中编写一些单元测试。我正在使用firebase并编写了这个函数(我想测试):import'dart:core';import'package:firebase_auth/firebase_auth.dart';import'package:firebase_database/firebase_database.dart';classFirebaseUtils{staticfinalFirebaseAuth_auth=FirebaseAuth.instance;staticException_exception;staticFuturesignIn(St

android - Firebase Android onAuthStateChanged() 在 signInWithEmailAndPassword() 之后触发两次

当我使用signInWithEmailAndPassword()登录时,onAuthStateChanged()总是触发两次。我很确定监听只添加了一次到firebaseAuth,然后我在onStop()`中有代码可以移除监听器。有人知道怎么解决吗?我的代码:publicclassSignInActivityextendsBaseActivityimplementsView.OnClickListener,GoogleApiClient.OnConnectionFailedListener{privatestaticfinalStringPREF_KEY_USER_EMAIL="User