Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def set_passcode(mfa_option):
"""Set totp passcode.
If the user has selected the passcode option, collect their TOTP.
:param mfa_option: selected factor
:return passcode: passcode value from user
"""
passcode = None
if mfa_option["factor"].lower() == "passcode":
print('Type your TOTP and press Enter')
passcode = helpers.get_input()
return passcode