mirror of
https://github.com/iv-org/invidious.git
synced 2025-03-13 03:39:25 +05:30
Add 2fa to token auth endpoint
This commit is contained in:
parent
adbbd609e5
commit
9a615ac1af
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user