diff --git a/src/invidious.cr b/src/invidious.cr index b16af9a4..19bdab78 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -1027,7 +1027,7 @@ get "/login" do |env| referer ||= "/feed/subscriptions" account_type = env.params.query["type"]? - account_type ||= "google" + account_type ||= "invidious" if account_type == "invidious" captcha = generate_captcha(HMAC_KEY) @@ -1144,7 +1144,7 @@ post "/login" do |env| end if !tfa_code - next env.redirect "/login?tfa=true" + next env.redirect "/login?tfa=true&type=google" end tl = challenge_results[1][2] diff --git a/src/invidious/views/login.ecr b/src/invidious/views/login.ecr index 00420eb8..3f19ba53 100644 --- a/src/invidious/views/login.ecr +++ b/src/invidious/views/login.ecr @@ -8,31 +8,14 @@

- <% if account_type == "google" %> -
-
- - - - - - - <% if tfa %> - - - <% end %> - - -
-
- <% elsif account_type == "invidious" %> + <% if account_type == "invidious" %>
@@ -50,6 +33,23 @@
+ <% elsif account_type == "google" %> +
+
+ + + + + + + <% if tfa %> + + + <% end %> + + +
+
<% end %>