Module: StandardId::ApplicationHelper

Defined in:
app/helpers/standard_id/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#otp_code_lengthObject

The configured OTP code length, clamped to the engine's supported range (4..10). Views use this so the verification-code input's maxlength stays in sync with the length of codes the generator actually produces.



6
7
8
# File 'app/helpers/standard_id/application_helper.rb', line 6

def otp_code_length
  StandardId::Passwordless.otp_code_length
end

#otp_retry_delayObject

The configured OTP resend cooldown, in seconds. The native login_verify view uses this to drive a client-side "resend in Ns" countdown that mirrors the server-side cooldown (passwordless.retry_delay, enforced in BaseStrategy#enforce_retry_delay!). 0 or negative means no cooldown.



14
15
16
# File 'app/helpers/standard_id/application_helper.rb', line 14

def otp_retry_delay
  StandardId::Passwordless.retry_delay
end