Skip to content

Invidious is an alternative front-end to YouTube

Fix check for 2-step verification

Omar Rothd97a272aa573
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.<br/>"
# Prefer Authenticator app and SMS over unsupported protocols