# Redirect rule continue returns unauthorized - possible timeout?

**URL:** <https://community.auth0.com/t/redirect-rule-continue-returns-unauthorized-possible-timeout/41059>\
**Category:** Get Help\
**Tags:** redirect-rules\
**Created:** [April 14, 2020, 6:58pm UTC](https://community.auth0.com/t/redirect-rule-continue-returns-unauthorized-possible-timeout/41059 "2020-04-14T18:58:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zblocker\_debtx](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/zblocker_debtx/32/14535_2.png) [@zblocker\_debtx](https://community.auth0.com/u/zblocker_debtx)\
**Post date:** [April 14, 2020, 6:58pm UTC](https://community.auth0.com/t/redirect-rule-continue-returns-unauthorized-possible-timeout/41059/1 "2020-04-14T18:58:29Z")

</div>

Similar to a few others on here, we are experiencing an issue where our redirect rule (for custom MFA) passes back to the `/continue` endpoint only to encounter a 401 Unauthorized response which does not redirect to our OIDC callback URL, but simply stops dead, showing the text “Unauthorized” in the browser.

It doesn’t happen reliably, but seems more likely if we wait too long on our MFA pages, before redirecting back to Auth0.

[HAR file](https://community.auth0.com/404) (284.5 KB) - heavily obfuscated/redacted

# What I have learned already:

- Seems to be timeout-related; if we wait on our custom MFA verify page for over 60 seconds (roughly), we are far more likely to trigger the Unauthorized error on `/continue`.
- Nothing shows up in the Auth0 console log about this.
- None of the continuation rule’s `console.log()` statements are appearing in my Webtask monitoring session, including a `console.log` statement right at the beginning of the rule. I had added these statements to check whether the rule itself was triggering the Unauthorized response (it heavily validates the incoming information and returns `UnauthorizedError` when necessary.)
- The `/continue` request is conspicuously _not_ redirecting back to our OIDC login callback URL (at least if it did, we could try to handle the problem there…)
- **UPDATE** Something highly suspicious I just noticed - you can see it in the HAR file - on the 302 redirect from Auth0 to our server, it sets two cookies `auth0` and `auth0_compat` that expire exactly one minute from the time of the response. These two cookies, presumably because they expired, are then not sent to the `/continue` request. _Is this our smoking gun?? If so, what can be done about it?_

We are not using any social connections (unlike those in a [similar conversation](http://community.auth0.com/t/redirect-rule-continue-returns-unauthorized/19669) ) - just an ordinary database connection.

Any insight would be appreciated.

---

<div class="post-metadata">

**Author:** ![zblocker\_debtx](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/zblocker_debtx/32/14535_2.png) [@zblocker\_debtx](https://community.auth0.com/u/zblocker_debtx)\
**Post date:** [April 14, 2020, 8:18pm UTC](https://community.auth0.com/t/redirect-rule-continue-returns-unauthorized-possible-timeout/41059/2 "2020-04-14T20:18:24Z")

</div>

It looks like we had our tenant Idle Session Timeout set to 1 minute!! Easy fix. 😄

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [April 15, 2020, 1:51pm UTC](https://community.auth0.com/t/redirect-rule-continue-returns-unauthorized-possible-timeout/41059/3 "2020-04-15T13:51:43Z")

</div>

Glad you have it working now!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [April 23, 2020, 1:09pm UTC](https://community.auth0.com/t/redirect-rule-continue-returns-unauthorized-possible-timeout/41059/4 "2020-04-23T13:09:23Z")

</div>


