# Intermittent CORS 401 on token request

**URL:** <https://community.auth0.com/t/intermittent-cors-401-on-token-request/95832>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [December 6, 2022, 8:48pm UTC](https://community.auth0.com/t/intermittent-cors-401-on-token-request/95832 "2022-12-06T20:48:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenzie](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kenzie/32/41770_2.png) [@kenzie](https://community.auth0.com/u/kenzie)\
**Post date:** [December 6, 2022, 8:48pm UTC](https://community.auth0.com/t/intermittent-cors-401-on-token-request/95832/1 "2022-12-06T20:48:11Z")

</div>

We capture user sessions and are seeing multiple instances of 401 errors, and finally managed to replicate locally and get more information. Here’s the error message we’re seeing:

```auto
Failed to load resource: the server responded with a status of 401 ()
main.cc1f3730e8f97b935bc8.bundle.js:2 ServerError: Response not successful: Received status code 401
    at t.throwServerError (npm.apollo.e827d4c1dd736c63e8b6.bundle.js:1:93277)
    at npm.apollo.e827d4c1dd736c63e8b6.bundle.js:1:87549
(anonymous) @ main.cc1f3730e8f97b935bc8.bundle.js:2
overview:1 Access to XMLHttpRequest at 'https://redacted.us.auth0.com/oauth/token' from origin 'https://redacted.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

```

This doesn’t happen very often, so I feel confident it’s not a configuration issue. `https://redacted.com` is included in Allowed Callback URLs, Allowed Logout URLs, Allowed Web Origins, and Allowed Origins (CORS).

I also feel confident it’s not a token refresh issue; I’ve set token expiration to a shorter duration and witnessed the refresh process working just fine.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [December 9, 2022, 9:46pm UTC](https://community.auth0.com/t/intermittent-cors-401-on-token-request/95832/3 "2022-12-09T21:46:24Z")

</div>

Hi @kenzie,

Welcome to the Auth0 Community!

Do you have an example of the exact request that is causing this error?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 30, 2023, 9:39pm UTC](https://community.auth0.com/t/intermittent-cors-401-on-token-request/95832/4 "2023-01-30T21:39:52Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
