  In this article, we prove that if a finitely generated group $G$ is not
torsion then a necessary and sufficient condition for every full shift over $G$
has (continuous) cocycle superrigidity is that $G$ has one end. It is a
topological version of the well known Popa's measurable cocycle superrigidity
theorem. For the proof of sufficient condition, we introduce a new
specification property for shifts over general groups which play a similar role
as malleable property in the measurable setting. This new specification
property is good enough for us to extend the method using homoclinic
equivalence relation that was introduced by Klaus Schmidt to study cocycle
rigidity for $\mathbb{Z}^d$-shifts. Indeed, in this direction we prove this
superrigidity result for more certain general systems. And for the converse, we
apply Specker's characterization for ends of groups via the associated first
cohomology groups to get the result. Finally, combining our results with a
result of Xin Li, we have an application in continuous orbit equivalence
rigidity.
