func U2F(ctx *context.Context) {
	ctx.Data["Title"] = ctx.Tr("twofa")
	ctx.Data["RequireU2F"] = true
	// 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 U2F session"))
		return
	}

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