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 ->
|
.map { rawCode ->
|
||||||
val code = rawCode
|
val code = rawCode
|
||||||
.trim()
|
.trim()
|
||||||
if (code.length != 6) {
|
if (code.isEmpty()) {
|
||||||
Validated.Failure(
|
Validated.Failure(
|
||||||
model = code,
|
model = code,
|
||||||
error = translate(Res.string.error_must_have_exactly_n_symbols, 6),
|
error = translate(Res.string.error_must_not_be_blank),
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
Validated.Success(
|
Validated.Success(
|
||||||
@ -423,10 +423,10 @@ private fun RememberStateFlowScope.createStateFlowForEmail(
|
|||||||
.map { rawCode ->
|
.map { rawCode ->
|
||||||
val code = rawCode
|
val code = rawCode
|
||||||
.trim()
|
.trim()
|
||||||
if (code.length != 6) {
|
if (code.isEmpty()) {
|
||||||
Validated.Failure(
|
Validated.Failure(
|
||||||
model = code,
|
model = code,
|
||||||
error = translate(Res.string.error_must_have_exactly_n_symbols, 6),
|
error = translate(Res.string.error_must_not_be_blank),
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
Validated.Success(
|
Validated.Success(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user