title: ASP.NET MVC: How to handle cross-action TempData and ViewData
body: <p>I'm trying to find a good way to handle the following scenario (I'm still kinda new to this):</p>
  
  <p>A user can register through my site using an RPX/OpenId provider.</p>
  
  <p>Step 1: The user authenticates through a provider. The provider returns a temporary token to one of my action methods.</p>
  
  <p>Step 2: I use the token to grab the user's profile information and load a view which allows them to enter any missing required fields and optional fields.</p>
  
  <p>I use 2 action methods in Step 2: One to handle the grabbing of information using the token. A second action which takes the authorization information and loads the missing/optional fields view.</p>
  
  <p>I am passing the authorization info via TempData to the second action. The second action can handle validation so there's a chance I will need to hold on to the authorization object for more than just 1 request. I can't use the token to regenerate the authorization info because it's technically a one-use token, and it would be silly to regenerate the request since it is using network resources.</p>
  
  <p>How could I persist the objects in my TempData for any subsequent requests to the same action, but remove the objects for any redirects? And since this may be a repeatable pattern in my application should I create a Filter to automatically handle this situation?</p>
  
  <p>For example, I imagine a filter attribute which will merge TempData (if any) into ViewData  - But how would I persist my data into future calls to the same action? Throw it into TempData again? And if I detect a redirect empty the TempData?</p>
  
  <p>Thanks</p>