public ActionResult LaunchpadCallback(string code)
{
if (!string.IsNullOrEmpty(code))
{
var message = "trying with code " + code + ".\n";
try
{
var reply = oAuthService.GetTokens(code);
oAuthService.AssignCookies(reply, Response);
return RedirectToAction("Chat");
}
catch (Exception ex)
{
Log.FatalException("unable to retrieve oauth tokens", ex);
message += ex.ToString();
ViewBag.Message = message;
return View("Error");
}
}
return RedirectToAction("Index");
}