The Leidenfrost transition leads a boiling system to the boiling crisis, a state in which the liquid loses contact with the heated surface due to excessive vapor generation. Here, using experiments of liquid droplets boiling on a heated surface, we report a phenomenon, termed oscillating boiling, at the Leidenfrost transition. We show that oscillating boiling results from the competition between two effects: separation of liquid from the heated surface due to localized boiling and rewetting. We argue theoretically that the Leidenfrost transition can be predicted based on its link with the oscillating boiling phenomenon and verify the prediction experimentally for various liquids.