window.location = "/bff/login";
If using Blazor, then you can instead use the NavigationManager:
Navigation.NavigateTo($"bff/login", forceLoad: true);
The login endpoint triggers an authentication challenge using the default challenge scheme, which will typically use the OpenID Connect handler.
After authentication is complete, the login endpoint will redirect back to your front end application. By default, this redirect goes to the root of the application. You can use a different URL instead by including a local URL as the returnUrl query parameter.
window.location = "/bff/login?returnUrl=/logged-in";