Firebase v3 createUserWithEmailAndPassword .then Promise

后端 未结 4 1924
醉话见心
醉话见心 2020-12-09 08:56

Firebase v3 Reference Guide indicates that createUserWithEmailAndPassword(email, password) returns firebase.Promise containing non-null fireb

4条回答
  •  粉色の甜心
    2020-12-09 09:59

    Check this, you need to read payload or snapshot(firebase term)

    firebase.auth().createUserWithEmailAndPassword(credentials.email, credentials.password)
                    .then((authData) => {
                        console.log("User created successfully with payload-", authData);
                        //Write code to use authData to add to Users
                    }).catch((_error) => {
                        console.log("Login Failed!", _error);
                    })
    

提交回复
热议问题