dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit f1abb9c5e38959f44cf127f4435a1f9fa903f456
parent 4ee6ee01cc8489225cf83b3abcc3d4a634adf3db
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Tue,  6 Jun 2023 21:10:00 -0700

fix order

Diffstat:
Mpkg/web/handlers/handlers.go | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go @@ -331,11 +331,14 @@ func loginFormHandler(c echo.Context) error { if user.GpgTwoFactorEnabled || string(user.TwoFactorSecret) != "" { token := utils.GenerateToken32() - twoFactorType := PgpStep - twoFactorClb := SessionsGpgTwoFactorHandler + var twoFactorType PartialAuthStep + var twoFactorClb func(echo.Context, bool, string) error if user.GpgTwoFactorEnabled && user.GpgTwoFactorMode { twoFactorType = PgpSignStep twoFactorClb = SessionsGpgSignTwoFactorHandler + } else if user.GpgTwoFactorEnabled { + twoFactorType = PgpStep + twoFactorClb = SessionsGpgTwoFactorHandler } else if string(user.TwoFactorSecret) != "" { twoFactorType = TwoFactorStep twoFactorClb = SessionsTwoFactorHandler