Browse Source

Use ROTP::Base32.random instead of ROTP::Base32.random_base32 if available

master
Jasper van den Berg 6 years ago
parent
commit
8f9377b28f
  1. 2
      lib/two_factor_authentication/models/two_factor_authenticatable.rb

2
lib/two_factor_authentication/models/two_factor_authenticatable.rb

@ -92,7 +92,7 @@ module Devise
end end
def generate_totp_secret def generate_totp_secret
ROTP::Base32.random_base32 ROTP::Base32.try(:random) || ROTP::Base32.random_base32
end end
def create_direct_otp(options = {}) def create_direct_otp(options = {})

Loading…
Cancel
Save