javascript - signInWithEmailAndPassword and EmailAuthProvider -


i trying understand new authentication model. trying convert web code used older authwithpassword.

considering had:

firebase.authwithpassword({email: email, password: password }).then(    authdata => console.log('auth: authwithpassword success '+authdata.uid),     err => console.log('auth: authwithpassword fail: '+err)); 

how achieve same thing new version ?

there seem 2 different interfaces:

auth().signinwithemailandpassword

and

firepad.auth.emailauthprovider

but don't understand difference or how use them. there clear example correct way email authentication ?

there lot of such differences new api. best stick closely docs.

the new docs site has guide on email/password authentication, specific question code:

firebase.auth().signinwithemailandpassword(email, password).catch(function(error) {   // handle errors here.   var errorcode = error.code;   var errormessage = error.message;   // ... }); 

source: https://firebase.google.com/docs/auth/web/password-auth#sign_in_a_user_with_an_email_address_and_password


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -