public async Task SignIn()
        {
            var identity = loginFacade.SignIn(Login);
            if (identity == null)
            {
                AlertText = "The credentials are not valid!";
                AlertType = AlertType.Danger;
            }

            await Context.GetAuthentication().SignInAsync("Cookie", identity);
            Context.RedirectToRoute("Admin_RegionList");
        }
Esempio n. 2
0
        public async Task SignIn()
        {
            var principal = await _loginFacade.SignIn(Login);

            if (principal == null)
            {
                AlertText = "The credentials are not valid!";
                AlertType = AlertType.Danger;
                return;
            }

            // CookieAuthenticationDefaults.AuthenticationScheme
            await Context.GetAuthentication().SignInAsync(AuthenticationConstants.AUTHENTICATION_TYPE_NAME, principal);

            Context.RedirectToRoute("Admin_RegionList");
        }