In the present article, we consider a model of phase separation based on the Allen-Cahn equation with nonconstant temperature, with dynamic boundary conditions for both the order parameter as well as the temperature function. We will show how to derive all the boundary conditions (including dynamic) for both the unknown functions. Using a fixed point argument, we obtain the existence and uniqueness of a global solution to our problem. The longtime behavior of the solution is investigated proving the existence of an exponential attractor (and thus, of a global attractor) with finite fractal dimension in a suitable Sobolev space.