As a followup to this question, I'm wondering what's happening to my TempData.
Scenario 1:
- user logs in
- user provides email address
- user receives email with validation code
- user clicks on validation url
- user is validated
- success msg is displayed via TempData set in Validate action
Scenario 2:
- user logs in
- user provides email address
- user logs out/times out
- user receives email with validation code
- user clicks on validation url
- user is validated
- success msg is not displayed via TempData set in Validate action
Now, I don't see a reason for the user to be logged in to validate. In Scenario 1, I put a "Success" message in TempData, and return RedirectToAction("Index"). Index action has an AuthorizeAttribute - if they're not logged in, they're redirected to the login screen (seperate controller).
I would like the login screen to display my message, but TempData appears to get cleared in this scenario. Am I misunderstanding the TempData lifecycle? Does it only apply to requests within the same controller?