예제 #1
0
        public ActionResult VkLoggedIn()
        {
            var vk = new Vkontakte();

            if (vk.UserInfo != null && !string.IsNullOrWhiteSpace(vk.UserInfo.Id))
            {
                return LogonWithVkUser(vk.UserInfo);
            }

            return RedirectToAction("Error", "Home", new { errorId = vk.UserInfo.FullName });
        }
예제 #2
0
        public ActionResult VkAuth()
        {
            var vk = new Vkontakte();

            var auth = vk.Authorize(new Uri(string.Format("{0}://{1}/Account/VkLoggedIn", Request.Url.Scheme, Request.Url.Authority)));

            return RedirectToAction("Error", "Home", new { errorId = "VkAuthDenied" });
        }