Error AtlasError Documentation and Resolution

CORS credentials cannot use a wildcard allowed origin

Reason: Credential is not supported if the CORS header 'Access-Control-Allow-Origin' is '*'

The request uses credentials while the response allows every origin with a wildcard. Browsers reject that combination; the server must explicitly allow the trusted origin or the client must omit unneeded credentials.

CORS credentials with wildcard origincors
Reason: Credential is not supported if the CORS header 'Access-Control-Allow-Origin' is '*'
  • fetch uses credentials: 'include' against a response containing Access-Control-Allow-Origin: *.
  • An XMLHttpRequest enables withCredentials while the server uses a public wildcard policy.
  1. Check whether the endpoint actually needs cookies or other browser credentials. For an intentionally anonymous request, use credentials: 'omit' and ensure the application does not rely on a session.
  2. If credentials are required, configure the server to return the exact allowlisted requesting origin instead of *. Return Access-Control-Allow-Credentials: true for the credentialed flow.
  3. When choosing an allowed origin dynamically, validate it rather than reflecting any caller and add Vary: Origin for caches.
  4. Retest preflight and actual responses. CORS permission does not override browser cookie restrictions, so investigate cookie policy separately if authentication still fails.
MDN: CORS credentials are incompatible with wildcard origin