A washing machine comprising: a main body configured to form an exterior of the washing machine and includes a laundry port formed in a front frame of the main body ; a tub installed inside the main body and configured to accommodate water; a drum rotatably installed inside the tub and configured to accommodate laundry; a detector configured to detect a temperature inside the tub ; a main door installed in the front frame of the main body to open or close the laundry port ; an auxiliary door installed in the main door and configured to be openable or closable separately from the main door ; a main locking device installed in the front frame of the main body ; a main locking part installed in the main door and configured to be insertable into and detachable from the main locking device to maintain the main door in a closed and opened state, respectively; an auxiliary locking device installed in the main door ; an auxiliary locking part installed in the auxiliary door and configured to be insertable into and detachable from the auxiliary locking device to maintain the auxiliary door in a closed or open state, respectively; characterised by further comprising: an inputter configured to receive an operational signal for opening or closing of the auxiliary door ; and a controller configured, in response to the operational signal, to control a locking of the auxiliary door using the auxiliary locking device based on the temperature detected by the detector , wherein the controller is further configured to unlock the main door and the auxiliary door when it is determined that the cycle of the washing machine has finished. a main body configured to form an exterior of the washing machine and includes a laundry port formed in a front frame of the main body ; a tub installed inside the main body and configured to accommodate water; a drum rotatably installed inside the tub and configured to accommodate laundry; a detector configured to detect a temperature inside the tub ; a main door installed in the front frame of the main body to open or close the laundry port ; an auxiliary door installed in the main door and configured to be openable or closable separately from the main door ; a main locking device installed in the front frame of the main body ; a main locking part installed in the main door and configured to be insertable into and detachable from the main locking device to maintain the main door in a closed and opened state, respectively; an auxiliary locking device installed in the main door ; an auxiliary locking part installed in the auxiliary door and configured to be insertable into and detachable from the auxiliary locking device to maintain the auxiliary door in a closed or open state, respectively; an inputter configured to receive an operational signal for opening or closing of the auxiliary door ; and a controller configured, in response to the operational signal, to control a locking of the auxiliary door using the auxiliary locking device based on the temperature detected by the detector , wherein the controller is further configured to unlock the main door and the auxiliary door when it is determined that the cycle of the washing machine has finished. <EOS>