Invidious is an alternative front-end to YouTube
Fix Google login
Omar Roth699f85e773c7
diff --git a/src/invidious.cr b/src/invidious.crindex 81318acf..b85baa19 100644--- a/src/invidious.cr+++ b/src/invidious.cr@@ -814,7 +814,7 @@ post "/login" do |env|if challenge_results[0][-1][0].as_a?# Prefer Authenticator app and SMS over unsupported protocols- if challenge_results[0][-1][0][0][8] != 6 || challenge_results[0][-1][0][0][8] != 9+ if challenge_results[0][-1][0][0][8] != 6 && challenge_results[0][-1][0][0][8] != 9tfa = challenge_results[0][-1][0].as_a.select { |auth_type| auth_type[8] == 6 || auth_type[8] == 9 }[0]select_challenge = "[#{challenge_results[0][-1][0].as_a.index(tfa).not_nil!}]"