Exemplo n.º 1
0
        public async Task OnGetAsync(string returnUrl = null)
        {
            if (!string.IsNullOrEmpty(ErrorMessage))
            {
                ModelState.AddModelError(string.Empty, ErrorMessage);
            }

            returnUrl = returnUrl ?? Url.Content("~/");

            // Clear the existing external cookie to ensure a clean login process
            await HttpContext.SignOutAsync(IdentityConstants.ExternalScheme);

            SysInfo = await _sysService.GetAsync();

            ExternalLogins = (await _signInManager.GetExternalAuthenticationSchemesAsync()).ToList();

            ReturnUrl = returnUrl;
        }
Exemplo n.º 2
0
        public async Task <ActionResult <SysDto> > Get()
        {
            var sys = await _sysService.GetAsync();

            var logins = (await _signInManager.GetExternalAuthenticationSchemesAsync());

            sys.AllQrExternalLogins = logins;

            return(sys);
        }