我正在尝试使用react-native进行授权,并且正在使用Firebase。我确定用户已经在Firebase中创建,但是程序总是返回“没有对应于所提供标识符的用户记录。该用户可能已被删除。”错误。这是我的验证码。
import firebase from 'react-native-firebase';
export default function loginEmail(eMail: String, password: String) {
return firebase.auth().signInWithEmailAndPassword(eMail, password);
}
我这样调用此函数;
import { take, call, put } from 'redux-saga/effects';
import type { IOEffect } from 'redux-saga/effects';
import { loginEmail as loginEmailService } from '../../../services/auth';
import * as authActions from 'actions/auth';
import { startTabBasedApp } from '../../../index';
export function* loginEmail(): Generator<IOEffect, void, any> {
while (true) {
try {
const { eMail, password } = yield take(authActions.LOGIN_EMAIL.REQUEST); // Take every action
yield call(loginEmailService, eMail, password);
yield put(authActions.loginEmail.success());
startTabBasedApp();
} catch (errorMessage) {
// Show info
yield put(authActions.loginEmail.failure(errorMessage));
}
}
}
我该如何解决?