public async Task <IActionResult> ProviderCallback(string provider)
        {
            var authProvider = _providerFactory.Get(provider);

            UserInformation user;

            try
            {
                var secret = HttpContext.Session.GetString("secret");
                user = await authProvider.AuthenticateUser(Request, secret);
            }
            catch (Exception ex) when(!(ex is NogginNetCoreConfigException))
            {
                var failInfo = new AuthenticationFailInformation(ex);

                return(await _loginHandler.FailedLoginFrom(provider, failInfo, HttpContext));
            }

            var loginSuccess = !string.IsNullOrEmpty(user.Id);

            if (loginSuccess)
            {
                return(await _loginHandler.SuccessfulLoginFrom(provider, user, HttpContext));
            }
            else
            {
                // todo: Get better fail info from provider
                var failInfo = new AuthenticationFailInformation("Could not authenticate", user);
                return(await _loginHandler.FailedLoginFrom(provider, failInfo, HttpContext));
            }
        }