How to use Okta Sign-in Widget with Multiple Okta Tenants

We have two Okta tenants—one for internal users and another for external users. Our OIDC application utilizes the Okta Sign-in widget for embedded authentication. When a user enters their email address, we need to determine their identity provider (IdP) based on the email domain. If it’s an internal user, we want to authenticate them using the B2B Okta tenant, and for external users, we want to use the B2C Okta tenant. Any insights on how to implement this with the Okta Sign-in widget?