mirror of
https://github.com/AChep/keyguard-app.git
synced 2025-02-02 07:18:24 +01:00
improvement(Login): Do not force 2FA code to be 6 symbols long
This commit is contained in:
parent
7ef1648fb4
commit
a9c369d7f4
@ -272,10 +272,10 @@ private fun RememberStateFlowScope.createStateFlowForAuthenticator(
|
||||
.map { rawCode ->
|
||||
val code = rawCode
|
||||
.trim()
|
||||
if (code.length != 6) {
|
||||
if (code.isEmpty()) {
|
||||
Validated.Failure(
|
||||
model = code,
|
||||
error = translate(Res.string.error_must_have_exactly_n_symbols, 6),
|
||||
error = translate(Res.string.error_must_not_be_blank),
|
||||
)
|
||||
} else {
|
||||
Validated.Success(
|
||||
@ -423,10 +423,10 @@ private fun RememberStateFlowScope.createStateFlowForEmail(
|
||||
.map { rawCode ->
|
||||
val code = rawCode
|
||||
.trim()
|
||||
if (code.length != 6) {
|
||||
if (code.isEmpty()) {
|
||||
Validated.Failure(
|
||||
model = code,
|
||||
error = translate(Res.string.error_must_have_exactly_n_symbols, 6),
|
||||
error = translate(Res.string.error_must_not_be_blank),
|
||||
)
|
||||
} else {
|
||||
Validated.Success(
|
||||
|
Loading…
x
Reference in New Issue
Block a user