diff --git a/src/invidious/routes/accounts.cr b/src/invidious/routes/accounts.cr index e0eb82af..b89c4e64 100644 --- a/src/invidious/routes/accounts.cr +++ b/src/invidious/routes/accounts.cr @@ -35,7 +35,7 @@ class Invidious::Routes::Accounts < Invidious::Routes::BaseRoute sid = env.get? "sid" referer = get_referer(env, unroll: false) - if !user + if !user || user.is_a? User && !user.totp_secret return env.redirect referer end @@ -54,7 +54,7 @@ class Invidious::Routes::Accounts < Invidious::Routes::BaseRoute sid = env.get? "sid" referer = get_referer(env, unroll: false) - if !user + if !user || user.is_a? User && !user.totp_secret return env.redirect referer end