public async Task <ActionResult> Index(vm.LoginForm loginForm, vm.SocialMediaLogin socialMediaLogin) { if (Request.IsAjaxPost()) { return(Redirect(Url.CurrentUri().OriginalString)); } if (User.Identity.IsAuthenticated) { return(Redirect(Url.Index("LoginDispatch"))); } if (Url.ReturnUrl().IsEmpty()) { return(Redirect("/login" + "?ReturnUrl=" + "/login")); } ModelState.Clear(); // Remove initial validation messages ViewBag.LoginForm = loginForm; ViewBag.SocialMediaLogin = socialMediaLogin; return(View(ViewBag)); }
public async Task <ActionResult> LoginByFacebook(vm.SocialMediaLogin info) { await OAuth.Instance.LoginBy("Facebook"); return(JsonActions(info)); }
public async Task <ActionResult> LoginByGoogle(vm.SocialMediaLogin info) { await OAuth.Instance.LoginBy("Google"); return(JsonActions(info)); }
public async Task <ActionResult> LoginByMicrosoft(vm.SocialMediaLogin info) { await OAuth.Instance.LoginBy("Microsoft"); return(JsonActions(info)); }