本文介绍了有没有办法为 Firebase 设置密码强度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
const connect = auth.createUserWithEmailAndPassword(email,pass).catch(function(error){
if(error.code === 'auth/weak-password'){
errmsg.style.display = 'block';
errmsg.style.opacity = '1';
errmsg.innerHTML= 'The password is too weak.';
}
在默认设置下,密码要求为 6 个字符(字母/数字).有没有办法改变这个(例如要求密码是字母数字组合)>
With the default setting, the requirement for password is 6 characters (letter/number). Is there a way to change this (Ex. require password to be letter-number combined)>
推荐答案
Firebase Authentication 的 email+password 身份验证的密码强度是不可配置的.如果您想完全控制要求,您可以考虑在Firebase 身份验证.
The password strength of Firebase Authentication's email+password authentication is not configurable. If you want full control over the requirements, you can consider implementing your own provider on top of Firebase Authentication.
另见:
这篇关于有没有办法为 Firebase 设置密码强度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!