I am building an Angular SPA that uses the @azure/msal-angular version 2.3.2 package for authenticating users in my organization with their Microsoft account. However, logging in using the web app which is hosted by Azure doesn't work while logging in to the same web app running under http://localhost:4200/ works as intended.
When logging in using my localhost version, I get redirected to a URL that is similar to
https://login.microsoftonline.com/.../oauth2/v2.0/authorize?client_id= ...
whilst logging in using the web app redirects me to
https://login.microsoftonline.com/.../oauth2/authorize?response_type=code+id_token ...
Trying to log in using the web app results in errors such as AADSTS9002325: Proof Key for Code Exchange is required for cross-origin authorization code redemption.
I assume that in order for the authorization to work I need the web app to use the correct endpoint, i. e., the one including /oauth2/v2.0. However, Azure doesn't give me an option to choose the endpoint to use for logging in users and I'm confused as to why the endpoint is used locally but not in production.
Is there a settings that I'm missing? How can I cause the web app to use the correct endpoint for logging in users?
