By the time, Auth0 gave an easy solution for this. Now you can assign emails to the username property by doing this change.
- Go to Database -> <Your_Database> -> Select "Attibutes" tab -> Select "Add Attribute" button -> Add "Username" option

- Next, select three dots in Username -> Click "Configure" -> scroll down and expand "Advanced Settings" -> In there you can give the command to the username to accept email formats or phone number formats
