You get 90 days or the end of the current lease term, whichever is greater.
If I remember it correctly the right to complete the lease term applies while the foreclosing bank is holding the property. If the bank puts the property on the market and someone buys it the new owner does not need to honor the lease term, but you still get your 90 days.
I was an actor in the process three years ago. The tenant decided to stay the full 90 days. The previous owner had some appliances in the house (refrigerator/washer/drier and various small items), so the tenant had to deal with the previous owner. Also, no one really felt responsible to maintain the property (landscaping service was canceled by the previous owner). The flipside for the tenant was that no one asked about the rent, so they stayed 3 months while paying no rent.