diff --git a/src/invidious/routes/account.cr b/src/invidious/routes/account.cr index e69f118a..23101eed 100644 --- a/src/invidious/routes/account.cr +++ b/src/invidious/routes/account.cr @@ -207,6 +207,11 @@ module Invidious::Routes::Account user = env.get? "user" sid = env.get? "sid" + + if user.totp_secret && env.request.cookies["2faVerified"]?.try &.value != "1" || nil + return call_totp_validator(env, user, sid, locale) + end + referer = get_referer(env) if !user