'React app using MSAL 2.0 getting error AADSTS9002326 Cross-origin token redemption is permitted only for the 'Single-Page Application' client-type

After a broad research I can't find clarification about platforms in Azure App registrations.

Azure is allowing me to add a platform where Web and Spa types can coexist. However, having an existing Web platform with some URLs when I add a SPA platform with one Redirect URI for my React App with MSAL 2.0 to authenticate by Code Flow + PKCE I get the error AADSTS900232 "Cross-origin token redemption is permitted only for the 'Single-Page Application' client-type". If the only platform is Spa then it works fine.

I've seen comments and examples about creating one app registration for each platform, but why does Azure allows you to add different platforms for the same app if that doesn't seem to work?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source