(% if let TotpCheckResult::Init with { secret, qr_code_svg, steps, digits, algo, uri } = check_res %)
((qr_code_svg|safe))
((uri|safe))

TOTP details

(% endif %)
(% let potentially_invalid_name_class = "" %) (% let potentially_invalid_check_class = "" %) (% let wrong_code = false %) (% let broken_app = false %) (% if let TotpCheckResult::Failure with { wrong_code, broken_app, warnings } = check_res %) (% let wrong_code = wrong_code.clone() %) (% let broken_app = broken_app.clone() %) (% if !warnings.is_empty() %) (% let potentially_invalid_name_class = "is-invalid" %) (% endif %) (% if wrong_code %) (% let potentially_invalid_check_class = "is-invalid" %) (% endif %) (% endif %) (% if let TotpCheckResult::Failure with { wrong_code, broken_app, warnings } = check_res %)
    (% for warn in warnings %)
  • (( warn ))
  • (% endfor %)
(% endif %) (% if broken_app || wrong_code %)
    (% if wrong_code %)
  • Incorrect TOTP code - Please try again
  • (% endif %) (% if broken_app %)
  • Your authenticator appears to be implemented in a way that uses SHA1, rather than SHA256. Are you sure you want to proceed? If you want to try with a new authenticator, enter a new code.
  • (% endif %)
(% endif %)
(% if broken_app %) (% else %) (% endif %)