The interface superconductivity in LaAlO$_{3}$-SrTiO$_{3}$ heterostructures reveals a non-monotonic behavior of the critical temperature as a function of the two-dimensional density of charge carriers. We develop a theoretical description of interface superconductivity in strongly polar heterostructures, based on the dielectric function formalism. The density dependence of the critical temperature is calculated accounting for all phonon branches including different types of optical (interface and half-space) and acoustic phonons. The LO- and acoustic-phonon-mediated electron-electron interaction is shown to be the dominating mechanism governing the superconducting phase transition in the heterostructure.