Example #1
0
        public GoogleAuthentication(string tenant)
        {
            this.Tenant = tenant;
            var profile = ConfigurationProfiles.GetActiveProfileAsync(tenant).GetAwaiter().GetResult();

            this.ClientId = profile.GoogleSigninClientId;
        }
Example #2
0
        public ActionResult Index()
        {
            var profile = ConfigurationProfiles.GetActiveProfile();

            if (!profile.AllowRegistration || this.User.Identity.IsAuthenticated)
            {
                return(this.Redirect("/dashboard"));
            }

            return(this.View(this.GetRazorView <AreaRegistration>("SignUp/Index.cshtml")));
        }
Example #3
0
        public async Task <ActionResult> IndexAsync()
        {
            if (this.User.Identity.IsAuthenticated)
            {
                return(this.Redirect("/dashboard"));
            }

            var profile = await ConfigurationProfiles.GetActiveProfileAsync(this.Tenant).ConfigureAwait(true);

            var model = profile.Adapt <SignIn>() ?? new SignIn();

            return(this.View(this.GetRazorView <AreaRegistration>("SignIn/Index.cshtml", this.Tenant), model));
        }
Example #4
0
        public ActionResult Index()
        {
            if (User.Identity.IsAuthenticated)
            {
                return(Redirect("/dashboard"));
            }

            var profile = ConfigurationProfiles.GetActiveProfile();


            var model = profile.Adapt <SignIn>() ?? new SignIn();

            return(View(GetRazorView <AreaRegistration>("SignIn/Index.cshtml"), model));
        }
Example #5
0
        public async Task <ActionResult> IndexAsync()
        {
            if (RemoteUser.IsListedInSpamDatabase(this.Tenant))
            {
                return(this.View(this.GetRazorView <AreaRegistration>("ListedInSpamDatabase.cshtml", this.Tenant)));
            }

            var profile = await ConfigurationProfiles.GetActiveProfileAsync(this.Tenant).ConfigureAwait(true);

            if (!profile.AllowRegistration ||
                this.User.Identity.IsAuthenticated)
            {
                return(this.Redirect("/dashboard"));
            }

            return(this.View(this.GetRazorView <AreaRegistration>("SignUp/Index.cshtml", this.Tenant)));
        }