I have couple of swagger API with ASP.NET Core 3.1 that are meant only for internal dev or internal users. For e.g. They have API that create and manage VMs.
I do not want any external user to see the API or explore them. Currently I have the OAuth 2.0 AUthorization Code Workflow setup that will authenticate our internal users but still any external user can open the URL look at the APIs and syntax.
How can I force the OAuth authentication for e.g. show Authorize window automatically when the swagger ui is loaded and disallow user closing the Authorize Window till user is authorized.