digraph twofa { bgcolor=transparent; "Start" -> "Login + password" "Login + password" -> "Password correct?" "Password correct?" [shape="diamond"] "Password correct?" -> "Wait" [label="no" color="red" fontcolor="red"] "Wait" -> "Login + password" "Password correct?" -> "2FA Cookie < 90 days\nfor 'Login'?" [label="yes" color="green" fontcolor="green"] "2FA Cookie < 90 days\nfor 'Login'?" [shape="diamond"] "2FA Cookie < 90 days\nfor 'Login'?" -> "Success" [label="yes" color="green" fontcolor="green"] "Success" [color="green" fontcolor="green"] "2FA Cookie < 90 days\nfor 'Login'?" -> "Send OTP challenge" [label="no" color="red" fontcolor="red"] "Send OTP challenge" -> "OTP success?" "OTP success?" [shape="diamond"] "OTP success?" -> "Put dated 2FA cookie" [label="yes" color="green" fontcolor="green"] "OTP success?" -> "Too many failed\nattempts?" [label="no" color="red" fontcolor="red"] "Too many failed\nattempts?" [shape="diamond"] "Too many failed\nattempts?" -> "Send OTP challenge" [label="no" color="green" fontcolor="green"] "Too many failed\nattempts?" -> "Blocked account" [label="yes" color="red" fontcolor="red"] "Blocked account" [color="red" fontcolor="red"] "Put dated 2FA cookie" -> "Success" }