diff --git a/src/OpenIddict.Client.SystemIntegration/OpenIddictClientSystemIntegrationHandlers.Authentication.cs b/src/OpenIddict.Client.SystemIntegration/OpenIddictClientSystemIntegrationHandlers.Authentication.cs index 49cae0fd..c38c61c5 100644 --- a/src/OpenIddict.Client.SystemIntegration/OpenIddictClientSystemIntegrationHandlers.Authentication.cs +++ b/src/OpenIddict.Client.SystemIntegration/OpenIddictClientSystemIntegrationHandlers.Authentication.cs @@ -157,10 +157,15 @@ public static partial class OpenIddictClientSystemIntegrationHandlers source.SetResult(url); } - else + else if (error is not null) { source.SetException(new NSErrorException(error)); } + + else + { + source.SetException(new InvalidOperationException(SR.GetResourceString(SR.ID0448))); + } }); #if SUPPORTS_PRESENTATION_CONTEXT_PROVIDER diff --git a/src/OpenIddict.Client.SystemIntegration/OpenIddictClientSystemIntegrationHandlers.Session.cs b/src/OpenIddict.Client.SystemIntegration/OpenIddictClientSystemIntegrationHandlers.Session.cs index 9bc57a57..84493d89 100644 --- a/src/OpenIddict.Client.SystemIntegration/OpenIddictClientSystemIntegrationHandlers.Session.cs +++ b/src/OpenIddict.Client.SystemIntegration/OpenIddictClientSystemIntegrationHandlers.Session.cs @@ -157,10 +157,15 @@ public static partial class OpenIddictClientSystemIntegrationHandlers source.SetResult(url); } - else + else if (error is not null) { source.SetException(new NSErrorException(error)); } + + else + { + source.SetException(new InvalidOperationException(SR.GetResourceString(SR.ID0448))); + } }); #if SUPPORTS_PRESENTATION_CONTEXT_PROVIDER