Closed MohdAnas closed 7 years ago
@MohdAnas sorry for the late response. Unfortunately Active Model OTP doesn't provide an api that provide such option. But you can override this Instance method on your model Model#otp_regenerate_secret
e.g
class User
def otp_regenerate_secret
if my_condition
self.otp_column = ROTP::Base32.random_base32
end
end
end
Can we generate the Key to setup google authenticator instead of scanning the QR code?
The result of ROTP::Base32.random_base32
can directly be used to setup Google Authenticator.
I already did that. Thanks for you help.
Is there any possibility to generate otp_secret_key only for some specific users not for all users?