public GoogleAuthentication(string tenant) { this.Tenant = tenant; var profile = ConfigurationProfiles.GetActiveProfileAsync(tenant).GetAwaiter().GetResult(); this.ClientId = profile.GoogleSigninClientId; }
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"))); }
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)); }
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)); }
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))); }