Cancelling the prompt yields an empty string, so you can check for an empty string and return to the previous passage if necessary:
(set: $name to (prompt: "What is your first name?", "Type your name here"))
(if: $name is "")[(undo:)]
[[Okay|okayName]]
I prefer adding a dash of snark. This version assumes you've been to at least one previous passage, and the current passage is called "GetName". It reloads the prompt until they make an effort:
(if: (history:)'s last is "GetName")[
(set: $name to (prompt: "No, REALLY. I need your first name.", "Type your name here. For real."))
](else:)[
(set: $name to (prompt: "What is your first name?", "Type your name here"))
]
(if: $name is "" or "Type your name here")[(goto: "GetName")]
Your name is $name.
[[Okay|okayName]]