/.auth/ endpoints of static web app do not work after enabling custom mode (authentication)

Dhiogo Acioli 0 Reputation points
2025-08-19T02:01:20.38+00:00

Error when enabling authentication in custom mode (static web app + Blazor WASM)

Two errors occur:

1 - The "/.auth/me" API doesn't return a JSON file, but rather my HTML page;

2 - When trying to log in (example: .auth/login/google), it finds nothing and triggers a "not found" error (Sorry, there's nothing at this address);

Note 1: It's worth noting that this error only occurs when I try to enable custom mode in Azure. If I leave it in simple mode, it works normally.

Note 2: These endpoints are from Azure (not mine), created exclusively and automatically for apps that are installed in the static web app.

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.