Peter Parker has actually had his identity exposed on several occasions, but he's always been able to put the genie back in the bottle, either through a convoluted explanation, or through a horrendous retcon wherein he sacrificed his entire life to save Aunt May. Priorities, Pete. Priorities.
Unsurprisingly, the most shocking occasion where Spider-Man had his identity revealed also related to that retcon. Back during Civil War, when Marvel's superheroes found themselves pitted against each other on the topic of accountability and individual liberty (which included the right to have a secret identity), Spider-Man wound up surprising everyone by siding with Tony Stark, who was heading up the pro-registration side of the debate.
Parker's own identity had been a closely guarded secret for four decades by this point, and it was for that reason that Tony believed he should be the poster-boy of the Pro-Reg movement. Stark convinced Peter to follow in his footsteps and reveal his true identity to the world - a decision Spidey would later come to regret.
Spider-Man voluntarily giving up his anonymity may not count as him being exposed per se, but Stark's manipulation could definitely put it into that bracket.