public void SignIn(string customReturnUrl = null) { var httpClient = _hostHttpClient.CreateHttpClient(); var returnUrl = customReturnUrl != null?_navigation.ToAbsoluteUri(customReturnUrl).ToString() : null; var encodedReturnUrl = Uri.EscapeDataString(returnUrl ?? new Uri(_navigation.Uri).PathAndQuery); var logInUrl = new Uri(httpClient.BaseAddress, $"{LogInPath}?returnUrl={encodedReturnUrl}"); // var logInUrl = _navigation.ToAbsoluteUri($"{LogInPath}?returnUrl={encodedReturnUrl}"); var sLoginUrl = logInUrl.ToString(); _navigation.NavigateTo(logInUrl.ToString(), true); }
public AuthStatusService( ILogger <AuthStatusService> logger, IHostHttpClient hostHttpClient) { _logger = logger; _httpClient = hostHttpClient.CreateHttpClient(); }
public FetchAuthStatusService(IHostHttpClient hostHttpClient) { _httpClient = hostHttpClient.CreateHttpClient(); }
public FetchWeatherForecastService(IHostHttpClient hostHttpClient) { _httpClient = hostHttpClient.CreateHttpClient(); }
public FetchAuthStatusService(IHostHttpClient hostHttpClient, OAuth2.TokenManagement.Client.ITokenManager tokenManager) { _httpClient = hostHttpClient.CreateHttpClient(); _tokenManager = tokenManager; }