密码要求时使用firrebase帐户 [英] Password Requirements when making an account with firrebase

查看:99
本文介绍了密码要求时使用firrebase帐户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么要求避免在firebase.auth()。createUserWithEmailAndPassword(email,password)上输入auth / weak-password错误代码。

我想向用户显示需求,以便他们不必在创建帐户的过程中多次抛出错误。



我已经检查了firebase文档: https://firebase.google.com/docs/reference/js /firebase.auth.Auth



和堆栈溢出,但没有找到这个信息。谢谢!

解决方案我知道的唯一缺点是长度少于6个字符:


public final class FirebaseAuthWeakPasswordException延伸
FirebaseAuthInvalidCredentialsException


$ b 使用弱密码时(小于6字符)创建新的
帐户或更新现有帐户的密码。使用getReason()
来获取消息,验证失败的原因是
可以显示给用户。



摘自本文档

What are the requirements to avoid throwing the "auth/weak-password" error code on the firebase.auth().createUserWithEmailAndPassword(email, password).

I would like to show the user the requirements so they don't have to throw the error several times on the way to create an account.

I have checked the firebase documentation: https://firebase.google.com/docs/reference/js/firebase.auth.Auth

and stack overflow but have not found this info. Thanks!

解决方案

The only weakness test I'm aware of is length less than 6 characters:

public final class FirebaseAuthWeakPasswordException extends FirebaseAuthInvalidCredentialsException

Thrown when using a weak password (less than 6 chars) to create a new account or to update an existing account's password. Use getReason() to get a message with the reason the validation failed that you can display to your users.

Excerpted from this documentation.

这篇关于密码要求时使用firrebase帐户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆