Browse Source

Merge pull request #171 from jaspervandenberg/newer_rotp_support

Use ROTP::Base32.random instead of ROTP::Base32.random_base32 if available
master
Dmitrii Golub 6 years ago committed by GitHub
parent
commit
20544c7773
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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