Find all real solutions for x in 2(2^x- 1) x^2 + (2^{x^2}-2)x = 2^{x+1} -2

Find all real solutions for $x$ in $$ 2(2^x- 1) x^2 + (2^{x^2}-2)x = 2^{x+1} -2 . $$

\(x = -1 \\ x= 0 \\ x= +1\)

could you give an algebreaic solution and explain it pelase?