Can a player capture en passant two times in a row? Suppose that there are only two pawns that White can use to put the Black king in check that are on the board.
But in both cases, the pawns need to move past Black pawns, risking en passant capture to both pawns.

So, my question is this: Can an opponent capture en passant twice in a row, when two different sets of pawns are in play?
Yes, given that the opponent helps the capturing side, it is possible to capture en passant two times or more in a row
Here is a famous example from a real game. The score came from chessgames.com
You can find more such games here on Chess Stack Exchange.
[Title &quot;Sergey Gennadyevich Kudrin-Rudy C Douven, GMA Baleares op, Palma de Mallorca Spain, 1989&quot;]
[startply &quot;59&quot;]
[FEN &quot;&quot;]

1. e4 c6 2. d4 d5 3. Nc3 dxe4 4. Nxe4 Bf5 5. Ng3 Bg6 6. h4 h6 7. Nf3 Nd7 8. h5  Bh7 9. Bd3 Bxd3 10. Qxd3 e6 11. Bf4 Qa5+ 12. Bd2 Qc7 13. O-O-O Ngf6 14. Ne4  O-O-O 15. g3 Nxe4 16. Qxe4 Nf6 17. Qe2 Bd6 18. Ne5 c5 19. Rh4 Bxe5 20. dxe5 Nd7  21. Rg4 Rhg8 22. Re1 Qc6 23. Qe4 Nb8 24. Rf4 Rd7 25. Qh7 Rgd8 26. Ba5 b6 27. Bc3  Qd5 28. b3 b5 29. Kb1 b4 30. Bb2 f5 31. exf6 g5 32. hxg6 Rxh7 33. gxh7 e5 34. Rxe5 Qf7 35. Re7 Qf8 36. f7 Qxe7 37. f8=Q Rxf8 38. Rxf8+ Qxf8 39. h8=Q Qxh8 40. Bxh8 h5 41. Kc1 Kd7 42. Kd2 Ke6 43. Ke3 Kf5 44. f3 Nd7 45. Kd3 Nb6 46. Bg7 a5 47. Bf8 Nd7 48. Bd6 Ke6 49. Bc7 Kd5 50. c4+ bxc3 51. Kxc3

For an extreme showcase, here is a chess problem that features 7 en passant captures in a row! My source for it is Yet Another Chess Problem Database.
[Title &quot;Milan Velimirovic, Novi Temi 1979, 1st Prize, Mate In 10&quot;]
[FEN &quot;r7/pppppppN/8/1PPPPPPP/1n5k/R5N1/3n2K1/8 w KQkq - 0 1&quot;]

1. Ra4! a5 2. bxa6 b5 3. cxb6 c5 4. dxc6 d5 5. exd6 e5 6. fxe6 f5 7. gxf6 g5 8. hxg6 Ne4 9. Rxb4 Kg4 10. Rxe4#