Blaze.Controllers.HomeController.LaunchpadCallback C# (CSharp) Method

LaunchpadCallback() public method

public LaunchpadCallback ( string code ) : System.Web.Mvc.ActionResult
code string
return System.Web.Mvc.ActionResult
        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");
        }