authentication - Firebase Internal Error Occurred [Bad Request] - Email Auth -
i continue receive error when using createuserwithemailandpassword or signinwithemailandpassword. both throw "an internal error has occurred. [ bad request ]" error , can't figure out why. of api , sha1 keys between google api , firebase api match , have email/password authentication enabled. here's snippet of code, can't figure out why happens.
public void signin(string email, string password) {
mauth.signinwithemailandpassword(email, password) .addoncompletelistener(new oncompletelistener<authresult>() { @override public void oncomplete(@nonnull task<authresult> task) { if (task.issuccessful()) { //on successful sign in... //take user mainactivity intent intent = new intent(getcontext(), mainactivity.class); startactivityforresult(intent, 1); dialogfragment.dismissallowingstateloss(); } else { //if user can't sign in, toast, hide progress bar, un-dim background, , make screen touchable again toast.maketext(getcontext(), "invalid username or password", toast.length_short).show(); dialogfragment.dismissallowingstateloss(); getactivity().getwindow().clearflags(windowmanager.layoutparams.flag_not_touchable); } } }); }
wiki
Comments
Post a Comment