コード例 #1
0
        public ActionResult SocialMediaLogin(string lang, SocialMediaFormViewModel model)
        {
            if (!_socialMediaService.ValidateToken(model))
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            var isSuccess = _accountService.TryLoginUsingSocialMedia(model);

            if (isSuccess)
            {
                CookiesExtensions.CreateCookie(CookieVariables.TempMessageCookie, "Login.Submit.Success");
            }

            return(Json(new { LoggedIn = isSuccess }));
        }