Module: Devise::Models::Instant2faAuthenticatable

Defined in:
lib/devise_instant2fa/models/instant2fa_authenticatable.rb

Instance Method Summary collapse

Instance Method Details

#instant2fa_settings_urlObject



6
7
8
# File 'lib/devise_instant2fa/models/instant2fa_authenticatable.rb', line 6

def instant2fa_settings_url
  Instant2fa.create_settings(self.id.to_s)
end

#with_instant2fa_verification_urlObject



10
11
12
13
14
15
16
17
18
# File 'lib/devise_instant2fa/models/instant2fa_authenticatable.rb', line 10

def with_instant2fa_verification_url
  begin
    hosted_page_url = Instant2fa.create_verification(self.id.to_s)
    return hosted_page_url
  rescue Instant2fa::Errors::MFANotEnabled
  end

  return false
end