From d97a272aa5735126fa3d704173fd28ece0e7a25b Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Thu, 18 Jul 2019 19:30:52 -0500 Subject: [PATCH] Fix check for 2-step verification --- src/invidious.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious.cr b/src/invidious.cr index 80fc92b8..ee83657a 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -989,7 +989,7 @@ post "/login" do |env| next templated "error" end - if challenge_results[0][-1]?.try &.[0]?.try &.as_a? + if challenge_results[0][-1]?.try &.[0].as_a?.try &.[0][2]?.try &.== "TWO_STEP_VERIFICATION" traceback << "User has 2FA.
" # Prefer Authenticator app and SMS over unsupported protocols