func TwoFactor(ctx *context.Context) {
	ctx.Data["Title"] = ctx.Tr("twofa")

	// Check auto-login.
	if checkAutoLogin(ctx) {
		return
	}

	// Ensure user is in a 2FA session.
	if ctx.Session.Get("twofaUid") == nil {
		ctx.ServerError("UserSignIn", errors.New("not in 2FA session"))
		return
	}

	ctx.HTML(http.StatusOK, tplTwofa)
}
// TwoFactor shows the user a two-factor authentication page.
TwoFactor shows the user a two-factor authentication page.
// TwoFactor shows the user a two - factor authentication page .
func TwoFactor(ctx *context.Context) {
	ctx.Data["Title"] = ctx.Tr("twofa")
	if checkAutoLogin(ctx) {
		return
	}
	if ctx.Session.Get("twofaUid") == nil {
		ctx.ServerError("UserSignIn", errors.New("not in 2FA session"))
		return
	}
	ctx.HTML(http.StatusOK, tplTwofa)
}
func TwoFactor ( ctx * context . Context ) { ctx . Data [ " " ] = ctx . Tr ( " " ) if checkAutoLogin ( ctx ) { return } if ctx . Session . Get ( " " ) == nil { ctx . ServerError ( " " , errors . New ( " " ) ) return } ctx . HTML ( http . StatusOK , tplTwofa ) }
TwoFactor shows the user a two-factor authentication page.
TwoFactor shows the user a two - factor authentication page .
// Check auto-login. // Ensure user is in a 2FA session.