I bought my bathroom mirror online and they recommended mirror adhesive because normal stuff attacks the foil back, so I used that.
My wall was nowhere near vertical though, sloping about 12mm over the 60cm height of the mirror, so I used ply blocks and spacers screwed to the wall first, then glued to that. Supported at the bottom with tile spacers onto the tiles below while the adhesive set and it's rock solid. Grouting the gap then stops any movement for the full belt and braces.
I used (a lot) of caulk to fill the gap behind the mirror towards the top, which has marked one corner a tiny bit, so definitely beware of non-approved chemicals!
Incidentally, before I fitted the mirror I dropped it and cracked the corner, so bought a new one. I recently made a jewlery cabinet using the mirror as the front, with spare bits of ash from a wardrobe project. The mirror has a bevel on it, that meant it had to be recessed into the frame by 20mm. It was only when I'd cut up the 45mm wide strips of ash for the frame that I realised I had no means of cutting a 20mm deep stopped slot in the ash that was 4mm wide.
I wasn't overly confident, but as a last resort I routed the recess into the back of the ash frame and then used the rest of the mirror adhesive to glue the mirror into the frame. It's a 600 x 400 mirror, so pretty heavy, with a slim frame of 45mm x 15mm profile. My concern was that the weight would cause the glue on the hinged edge to part from the wood and rip the frame apart. It hasn't moved a jot, the glue is that good!