Bought a house for my parents and everything is in my name. They are paying for the mortgage and all repairs/renovations. I am currently renting an apartment with my S/O in NYC. Is this legal?

I paid the down payment, the mortgage and deed are under my name.  I accept that I will be responsible for making the mortgage payments should my parents not be able able to. I just want to know if this is legal, and if not, what ways I can go to fix this. And how would I go about doing my taxes in this situation? I understand that I probably should have asked prior to putting my name down on the mortgage, but it did not dawn on me until now. Any help would be appreciated.