📌  相关文章
📜  电子邮件地址格式错误反应 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:02:41.600000             🧑  作者: Mango

代码示例1
const {email, password} = this.state;
    this.setState({ error: '', loading: true });
    firebase.auth().signInWithEmailAndPassword(email.trim(), password)
        .then(this.onLoginSuccess.bind(this))
        .catch( (err) => {
            firebase.auth().createUserWithEmailAndPassword(email.trim(), password)
                .then(this.onLoginSuccess.bind(this))
                .catch(this.onLoginFailed.bind(this));
        });