当删除一个帐户并尝试创建一个新帐户时,通过首先检查邮件是否存在,我会收到以下错误:
主机平台为非null返回值返回了null值。
这就是我检查Mail是否已经在使用的方法,该函数将抛出
FirebaseExeption
:
static Future<bool> checkIfEmailIsAlreadyInUse({
required String email,
}) async {
try {
final list = await _firebaseAuth.fetchSignInMethodsForEmail(
email,
);
if (list.isNotEmpty) {
// Return true because there is an existing
// user using the email address
return true;
} else {
return false;
}
} on FirebaseAuthException catch (e) {
AlertService.showSnackBar(
title: 'Hopla, hier ist etwas schiefgelaufen...',
description: e.message ?? 'Unbekannter Fehler',
isSuccess: false,
);
return true;
}
}
当尝试使用邮件登录时,我收到以下消息:
没有与此标识符对应的用户记录。用户可以
已删除。
删除邮件后是否不可能重复使用?我检查了我的数据库,所有内容都被正确删除了。