ISsoOptions Destination option is ignored during Authn Request initiated by SP

Using Version 5.0.0

At my SP, when trying to specify the destination SsoOption in the InitiateSsoAsync call, this gets assigned correctly in SamlServiceProviderCreateAuthnRequestAsync but is ultimately not used in SamlServiceProvider.SendAuthnRequestAsync where the configured PartnerIdentityProvider SSO URL is sent regardless of the destination value.

This looks like a bug and will be resolved in the next release.

As a workaround, you can use the OnResolveUrl event to set the URL where the authn request is sent.

var partnerName = _configuration["PartnerName"];

var ssoOptions = new SsoOptions()
{
    Destination = "URL goes here"
};

_samlServiceProvider.Events.OnResolveUrl += (httpContext, samlEndpointType, url) =>
{
    return ssoOptions.Destination;
};

await _samlServiceProvider.InitiateSsoAsync(partnerName, returnUrl, ssoOptions);