Customize validation & text in Firebase reset password form?

梦想的初衷 提交于 2021-02-10 20:17:14

问题


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.

await firebaseAuth.sendPasswordResetEmail(email: userEmail);

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?

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."


回答1:


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.



来源:https://stackoverflow.com/questions/60013011/customize-validation-text-in-firebase-reset-password-form

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!