@Kid Kai great response from Saravanan. I am going to expand on their answer with more details.
To stop the automatic redirection to Microsoft login after adding an identity provider, you can adjust the settings in Azure’s Authentication / Authorization. Here are the steps you might want to consider:
- In the Azure portal, navigate to the Authentication / Authorization page of your application.
- Configure each of the identity providers you want to enable
- In the section Action to take when request is not authenticated, select Allow Anonymous requests (no action)
- In your app, add a sign-in link to each of the providers you enabled (
/.auth/login/<provider>
). This can be placed on your sign-in page, navigation bar, or any other location of your app. - This way, the user will not be automatically redirected to the Microsoft login page when they open your website. Instead, they will be redirected to the login page when they click on the sign-in button.