The short version: legitimate under a prescription within defined limits, unapproved by definition, and quality depends entirely on the facility.
Additives are the other divergence. Preparations combining an active with vitamins or other agents are not equivalent to the approved product and have not been studied in that combination.
Facility quality varies enormously and is the practical determinant of what you receive. The relevant questions are about sterility assurance, potency testing and beyond-use dating.
Compounding is defined in regulation as preparation for an individual patient under prescription and is distinguished from manufacturing by scale and by the patient-specific requirement.
The caveat is that the legal and regulatory position differs by jurisdiction and nothing here is legal advice.
Ask for the certificate of analysis on the lot. A serious facility has one.