On an H-1B visa, most lenders will decide the status of a mortgage applicant on a case-by-case basis by utilizing the information available to them. The following is required by most lenders...
Valid work visa
2 years US credit history
2 years US employment history
Good credit score, ideally over 670
US income that you expect to continue for at least 3 years
If you are applying for an FHA loan, you will need an Employment Authorization Document (EAD) from the USCIS.