For times when you need to keep things from your users

(1.5FA) time-based almost-one-time password algorithm… :grin:

def oneTimeAuthorize():
	resultString ="")
	resultPy = system.util.jsonDecode(resultString)
	btcpi = int(resultPy['bpi']['USD']['rate_float'])
	answer = system.gui.passwordBox("COINDESK BTC PI","Enter Password",'$')
		if int(float(answer))==btcpi: 
			return True
			return False 
		return False

You know this forum is public, right? :wink:

… and the user that finds this I will train in Ignition.

Why not just use a real TOTP authenticator, based on RFC 6238? Here is an example window.

Note, if you want this in production, the authenticator secrets need to be persisted per user, and the code will have to change a bit (There is no need for the Authenticator class to hold onto any keys, they get fed in during the check_code method).

If you have any questions let me know.
prime_totp_2017-10-22_1902.proj (13.7 KB)


Thank Kyle, that’s very helpful.