File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
packages/auth/src/core/auth Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,9 @@ import {
23
23
} from '../../model/password_policy' ;
24
24
import { PasswordValidationStatus } from '../../model/public_types' ;
25
25
26
+ // Minimum password length enforced by the backend, even if no minimum length is set.
27
+ const MINIMUM_MIN_PASSWORD_LENGTH = 6 ;
28
+
26
29
/**
27
30
* Stores password policy requirements and provides password validation against the policy.
28
31
*
@@ -39,9 +42,9 @@ export class PasswordPolicyImpl implements PasswordPolicyInternal {
39
42
// Only include custom strength options defined in the response.
40
43
const responseOptions = response . customStrengthOptions ;
41
44
this . customStrengthOptions = { } ;
42
- // A minimum length of 6 will be enforced by the backend if no minimum length is set.
45
+ // TODO: Remove once the backend is updated to include the minimum min password length instead of undefined when there is no minimum length set.
43
46
this . customStrengthOptions . minPasswordLength =
44
- responseOptions . minPasswordLength ?? 6 ;
47
+ responseOptions . minPasswordLength ?? MINIMUM_MIN_PASSWORD_LENGTH ;
45
48
if ( responseOptions . maxPasswordLength ) {
46
49
this . customStrengthOptions . maxPasswordLength =
47
50
responseOptions . maxPasswordLength ;
You can’t perform that action at this time.
0 commit comments