@Sanchit Razdan Looks like the CORS headers are not present on the redirection response, hence the error you are seeing.
You have a few options here
- Implement the Authentication Flow to get the token for your Function App manually and then pass it along with your request
- Make a call to your function app in a separate window/tab, so that the cookie is set and allowing future requests to go through. This endpoint could load a page that simply closes itself on success.
- Implement Authentication as part of your application itself and pass bearer tokens instead of Easy Auth. You could also consider using Azure API Management to offload token validation if required.
Ideally, the third option is usually the recommended approach when dealing with separate frontend and backend services.
The Easy Auth (Authentication/Authorization Feature in App Service) is best suited for scenarios where you have a self-contained app in a single Web App. Also, the same functionality within Azure Static Web Apps might be an option as well since API requests are proxied via the same domain.