app/models/user.rb
# Handy function that confirms and saves the secret
Handy function that confirms and saves the secret
Handy function that confirms and saves the secret
def confirm_totp_secret!( secret, code )
    return false unless confirm_totp_secret( secret, code )
    self.second_factor_enabled = true
    save
  end
def confirm_totp_secret! ( secret , code ) return false unless confirm_totp_secret ( secret , code ) self . second_factor_enabled = true save end
Handy function that confirms and saves the secret
Handy function that confirms and saves the secret
# if it fails… # update some pointers
secret
code