Module: Otpable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/generators/authentication/templates/models/concerns/otpable.rb
Overview
Model concern to provide shared behaviour for two-factor auth (one-time password)
Automatically generated by the orthodox gem (https://github.com/bodacious/orthodox)
Instance Method Summary collapse
Instance Method Details
#destroy_otp_credential ⇒ Object
22 23 24 |
# File 'lib/generators/authentication/templates/models/concerns/otpable.rb', line 22 def destroy_otp_credential otp_credential.destroy end |
#tfa? ⇒ Boolean
18 19 20 |
# File 'lib/generators/authentication/templates/models/concerns/otpable.rb', line 18 def tfa? otp_credential.present? end |