diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-07-24 17:55:58 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-07-24 17:55:58 -0500 |
| commit | 55167724b11414ba22293b1aed8c548e24b6daa9 (patch) | |
| tree | 52515d88ddbca800616bb8b3acb219f0548cbf96 /src | |
| parent | 333dcd2089f02d3dfb6861fc9797306f80813f9c (diff) | |
| download | invidious-55167724b11414ba22293b1aed8c548e24b6daa9.tar.gz invidious-55167724b11414ba22293b1aed8c548e24b6daa9.tar.bz2 invidious-55167724b11414ba22293b1aed8c548e24b6daa9.zip | |
Add fix for unsupported authentication protocols
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious.cr | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/invidious.cr b/src/invidious.cr index 073b444e..72259f87 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -1123,7 +1123,8 @@ post "/login" do |env| end if challenge_results[0][-1][0].as_a? - tfa = challenge_results[0][-1][0][0] + # Prefer Authenticator app and SMS over unsupported protocols + tfa = challenge_results[0][-1][0].as_a.select { |auth_type| auth_type[8] == 6 || auth_type[8] == 9 }[0] if tfa[2] == "TWO_STEP_VERIFICATION" if tfa[5] == "QUOTA_EXCEEDED" |
