As reported many times; users cannot receive verification codes via text message when only connected to wifi.
This is a frustrating problem to have... especially for someone like me who works in a tin box in a canyon where there is no cell phone reception. I rely on WIFI for getting text messages during the work day.