An Azure Static Web Apps site consists of several services that work together: static web, API functions, authentication and authorization, and routing/redirection. Running them locally can help much with debugging and testing. This is what the new Azure Static Web Apps CLI can do for you.
When adding an API callback to implement GitHub (OAuth) authentication for my Azure Static Web App, I had quite a bit of trouble. I found the reason was that the callback had a query parameter named code. In this article I will describe why it causes problems and how to solve it.