Browse Source

Additional comments in generate_totp_secret method

master
Dmitrii Golub 6 years ago
parent
commit
82e5aff7b3
  1. 3
      lib/two_factor_authentication/models/two_factor_authenticatable.rb

3
lib/two_factor_authentication/models/two_factor_authenticatable.rb

@ -92,6 +92,9 @@ module Devise
end
def generate_totp_secret
# ROTP gem since version 5 to version 5.1
# at version 5.1 ROTP gem reinstates.
# Details: https://github.com/mdp/rotp/blob/master/CHANGELOG.md#510
ROTP::Base32.try(:random) || ROTP::Base32.random_base32
end

Loading…
Cancel
Save