Find the general solution to $\csc \theta + \sec \theta = 1$

Your squaring of the equation $$\cos x+\sin x=\cos x\>\sin x\tag{1}$$ has introduced spurious solutions. In fact the value ${1\over2}\arcsin\bigl(2-2\sqrt{2}\bigr)\approx-0.488147$ does not solve the given problem.

Drawing the graphs of $x\mapsto \cos x+\sin x$ and $x\mapsto\cos x\>\sin x$ shows a symmetry with respect to $x={\pi\over4}$. We therefore put $x:={\pi\over4}+t$ and then have $$\cos x+\sin x=\sqrt{2}\>\cos t,\qquad\cos x\>\sin x={1\over2}\cos(2t)\ .$$ Plugging this into $(1)$ we obtain $$\sqrt{2}\cos t={1\over2}(2\cos^2 t-1)\ ,$$ so that $\cos t={\sqrt{2}\over2}-1$, or $$ t=\pm \alpha,\quad{\rm with}\quad \alpha:=\arccos{\sqrt{2}-2\over2}=1.86805\ .$$ This leads to the $x$-values $$x_1={\pi\over4}-\alpha=-1.08265,\qquad x_2={\pi\over4}+\alpha=2.65345\ .$$ Looking at the graphs we see that these solutions repeat with periodicity $2\pi$.