Shares of Okta (OKTA -0.69%) surged out of the gate Thursday morning, gaining as much as 28.4%. As of 11:30 a.m. ET, the stock was still up 20.8%.

The catalyst that sent the cybersecurity specialist soaring was its quarterly earnings results, which suggested the company may finally be on the path to recovery.

Beat and raise

For its fiscal 2024 fourth quarter (ended Jan. 31), Okta generated revenue of $605 million, up 19% year over year, fueled by subscription revenue of $591 million, which grew 20%. The company's focus on costs boosted its bottom line, as adjusted earnings per share (EPS) of $0.68 more than doubled.

To give the results some context, analysts' consensus estimates were calling for revenue of $587 million and EPS of $0.51, so Okta sailed past expectations with plenty of room to spare.

Okta's robust cash generation continued, with operating cash flow of $174 million, up 129% year over year, while free cash flow of $166 million surged 131%.

The company's customer metrics also improved, with total customers of 18,950, up 8% year over year. Okta's most lucrative customers -- those spending $100,000 annually -- grew even faster, climbing 14%. The company's trailing-12-month dollar-based net retention rate clocked in at 11%, which shows existing customers are expanding their relationships.

Okta's remaining performance obligation (RPO) -- or contractually obligated sales not yet booked into revenue -- is on the upswing. Current RPO of $1.95 billion increased 16% year over year, while its total RPO of $3.39 billion increased 13%. This marked an acceleration compared to Q3. Since RPO is a forward-looking indicator, it suggests Okta's sales have begun to reaccelerate.

A stark recovery

For the second quarter, the company is expecting revenue of about $604 million, up roughly 16% at the midpoint of its guidance, while guiding for full-year revenue of $2.5 billion. Both forecasts exceeded Wall Street's expectations of $585 million and $2.48 billion, respectively -- and investors let out a collective sigh of relief.

The economic headwinds and self-inflicted wounds Okta suffered appear to be in the rearview mirror. With the strides the company has made, it might finally be time to buy Okta stock again.