Exemplo n.º 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 });
        }
Exemplo n.º 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" });
        }