Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var userId = signinManager.GetVerifiedUserId <ApplicationUser, string>();

            if (userId == null)
            {
                Response.Redirect("/Account/Error", true);
            }
            var userFactors = manager.GetValidTwoFactorProviders(userId);

            Providers.DataSource = userFactors.Select(x => x).ToList();
            Providers.DataBind();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Request.IsSecureConnection)
            {
                string url =
                    System.Configuration.ConfigurationManager.AppSettings["SecurePath"] +
                    "Account/RegisterExternalLogin.aspx";
                Response.Redirect(url);
            }

            var userId = signinManager.GetVerifiedUserId <ApplicationUser, string>();

            if (userId == null)
            {
                Response.Redirect("/Account/Error", true);
            }
            var userFactors = manager.GetValidTwoFactorProviders(userId);

            Providers.DataSource = userFactors.Select(x => x).ToList();
            Providers.DataBind();
        }