Module: Devise::Models::TwoFactorAuthenticatable::ClassMethods
- Defined in:
- lib/devise_two_factor/models/two_factor_authenticatable.rb
Instance Method Summary collapse
- #generate_otp_secret(otp_secret_length = self.otp_secret_length) ⇒ Object
-
#splattable_encrypted_attr_options ⇒ Hash
Return value will be splatted with ** so return a version of the encrypted attribute options which is always a Hash.
Instance Method Details
#generate_otp_secret(otp_secret_length = self.otp_secret_length) ⇒ Object
96 97 98 |
# File 'lib/devise_two_factor/models/two_factor_authenticatable.rb', line 96 def generate_otp_secret(otp_secret_length = self.otp_secret_length) ROTP::Base32.random_base32(otp_secret_length) end |
#splattable_encrypted_attr_options ⇒ Hash
Return value will be splatted with ** so return a version of the encrypted attribute options which is always a Hash.
103 104 105 106 107 |
# File 'lib/devise_two_factor/models/two_factor_authenticatable.rb', line 103 def return {} if .nil? end |