My application is linked with firebase database and authentication.
When a user creates an account, the only requirements for the password are for it to be 6 charact
There is no way to configure Firebase Authentication's rules for password strength.
Also see
You can (and should ) restrict it from your code. But you can't prevent malicious users from bypassing this by calling the API directly.
If the password strength is a hard requirement for your app, consider implementing custom authentication. This example of custom username (instead of email) and password authentication might be helpful.
Use this function. It includes range 6-15 i.e. minimum 6 and maximum 15 characters.One Capital letter , One number respectively.
func isValidPasswordString(pwdStr:String) -> Bool {
let pwdRegEx = "(?:(?:(?=.*?[0-9])(?=.*?[-!@#$%&*ˆ+=_])|(?:(?=.*?[0-9])|(?=.*?[A-Z])|(?=.*?[-!@#$%&*ˆ+=_])))|(?=.*?[a-z])(?=.*?[0-9])(?=.*?[-!@#$%&*ˆ+=_]))[A-Za-z0-9-!@#$%&*ˆ+=_]{6,15}"
let pwdTest = NSPredicate(format:"SELF MATCHES %@", pwdRegEx)
return pwdTest.evaluate(with: pwdStr)
}
This func will return true for valid password string