自定义验证和Firebase重设密码表单中的文本? [英] Customize validation & text in Firebase reset password form?

查看:33
本文介绍了自定义验证和Firebase重设密码表单中的文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Flutter应用中使用Firebase身份验证.我使用PIN代替普通的密码,我严格定义了6位数字.如果我的用户忘记了PIN,我唯一的选择(还是不?)是通过调用 sendPasswordResetEmail 方法.

I use Firebase Authentication in my flutter app. I use PIN instead of normal password which is I strictly defined 6-digit number. In the case my user forgot their PIN, my only option (or not?) is by calling the sendPasswordResetEmail method.

等待firebaseAuth.sendPasswordResetEmail(email:userEmail);

问题是他们可以在Firebase重置密码输入中键入任何新密码,并且只能打破6位数字的规则.有什么方法可以自定义验证,标题文本等?

The problem is they can type any new password in the Firebase reset password input and breaking the rule for 6-digit numeric only. Is there any way to customize the validation, caption text, etc?

更新:仅作说明,Firebase提供了重置密码表格.用户无法通过我的应用设置新密码进行验证.他们单击电子邮件中的恢复链接,从而重定向到Firebase网站以设置新密码.因此,上面我的屏幕快照中的图片是Firebase网站,甚至不是我的flutter应用程序,因此它甚至不是 TextFormField .这是与重复"不同的问题.

UPDATE: Just for clarification, the reset password form is provided by Firebase. It is impossible that users set their new password via my app to validate. They clicked the recovery link in their email, thus redirected to the Firebase website to set their new password. So the picture in my screenshot above is Firebase website, not even my flutter app, thus that's not even a TextFormField. This is different question from the "duplicate."

推荐答案

当前,无法为Firebase身份验证的内置电子邮件+密码提供程序设置您自己的密码要求.如果要控制密码要求,则必须建立自己的身份验证提供者.

There is currently no way to set your own password requirements for Firebase Authentication's built-in email+password provider. If you want to control the password requirements, you'll have to build your own auth provider.

这篇关于自定义验证和Firebase重设密码表单中的文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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