diff --git a/src/Uno.Extensions.Authentication.UI/Web/WebAuthenticationProvider.cs b/src/Uno.Extensions.Authentication.UI/Web/WebAuthenticationProvider.cs index b0c00f5ece..aecd2566a2 100644 --- a/src/Uno.Extensions.Authentication.UI/Web/WebAuthenticationProvider.cs +++ b/src/Uno.Extensions.Authentication.UI/Web/WebAuthenticationProvider.cs @@ -51,6 +51,10 @@ private WebAuthenticationSettings InternalSettings if (loginStartUri is null || string.IsNullOrWhiteSpace(loginStartUri)) { + if (ProviderLogger.IsEnabled(LogLevel.Warning)) + { + ProviderLogger.LogWarning($"{nameof(InternalSettings.LoginStartUri)} not specified, unable to start login flow"); + } return default; } @@ -68,6 +72,10 @@ private WebAuthenticationSettings InternalSettings if (string.IsNullOrWhiteSpace(loginCallbackUri)) { + if (ProviderLogger.IsEnabled(LogLevel.Warning)) + { + ProviderLogger.LogWarning($"{nameof(InternalSettings.LoginCallbackUri)} not specified and {OAuthRedirectUriParameter} not set in {nameof(InternalSettings.LoginStartUri)}, unable to start login flow"); + } return default; } @@ -153,7 +161,11 @@ protected async override ValueTask InternalLogoutAsync(IDispatcher? dispat if (logoutStartUri is null || string.IsNullOrWhiteSpace(logoutStartUri)) { - return true; + if (ProviderLogger.IsEnabled(LogLevel.Warning)) + { + ProviderLogger.LogWarning($"{nameof(InternalSettings.LogoutStartUri)} not specified, unable to start logout flow"); + } + return false; } var logoutCallbackUri = InternalSettings.LogoutCallbackUri ?? InternalSettings.LoginCallbackUri; @@ -177,6 +189,10 @@ InternalSettings.LoginStartUri is { } loginStartUri && if (string.IsNullOrWhiteSpace(logoutCallbackUri)) { + if (ProviderLogger.IsEnabled(LogLevel.Warning)) + { + ProviderLogger.LogWarning($"{nameof(InternalSettings.LogoutCallbackUri)} not specified and {OAuthRedirectUriParameter} not set in {nameof(InternalSettings.LogoutStartUri)}, unable to start logout flow"); + } return false; }