# Redirect Rule for the Password Reset page

**URL:** <https://community.auth0.com/t/redirect-rule-for-the-password-reset-page/38019>\
**Category:** Get Help\
**Created:** [February 17, 2020, 4:03pm UTC](https://community.auth0.com/t/redirect-rule-for-the-password-reset-page/38019 "2020-02-17T16:03:21Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![BjoernRave](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bjoernrave/32/18598_2.png) [@BjoernRave](https://community.auth0.com/u/BjoernRave)\
**Post date:** [February 17, 2020, 4:03pm UTC](https://community.auth0.com/t/redirect-rule-for-the-password-reset-page/38019/1 "2020-02-17T16:03:21Z")

</div>

So I want to create a rule, which redirects users which log in for the first time to the auth0 reset password page. For that I created this rule:

```auto
async function checkGeneratedPassword(user, context, callback) {
  if (user.app_metadata.generatedPassword) {
    const ManagementClient = require("auth0@2.9.1").ManagementClient;
    const management = new ManagementClient({
      clientId: configuration.client_id,
      clientSecret: configuration.client_secret,
      domain: auth0.domain
    });

    const res = await management.createPasswordChangeTicket({
      user_id: user.user_id
    });

    context.redirect = {
      url: res.ticket
    };
  }

  return callback(null, user, context);
}

```

However the password reset page errors with the following error: `Cannot resume flow 'redirect'` I couldn’t find any info about this error.

When I remove the `state` query from the reset password url it works fine and I can reset my password.

---

<div class="post-metadata">

**Author:** ![markd](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/markd/32/38919_2.png) [@markd](https://community.auth0.com/u/markd)\
**Post date:** [February 18, 2020, 12:40am UTC](https://community.auth0.com/t/redirect-rule-for-the-password-reset-page/38019/2 "2020-02-18T00:40:25Z")

</div>

Hi @BjoernRave,

Just a guess, but that error sounds like it would be coming from the Rules engine (since the rules engine expects to “resume the flow” after a rule executes), rather than the password reset. Can you post the associated URLs and screenshots?

---

<div class="post-metadata">

**Author:** ![BjoernRave](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bjoernrave/32/18598_2.png) [@BjoernRave](https://community.auth0.com/u/BjoernRave)\
**Post date:** [February 18, 2020, 7:05pm UTC](https://community.auth0.com/t/redirect-rule-for-the-password-reset-page/38019/3 "2020-02-18T19:05:33Z")

</div>

Setting the rule as the last one so it doesn’t interfer with any other, doesn’t help either

I have no other rule which continues after this one though, because when the user changed his password he can log in, does that cause an issue?

sure, the url, which gets generated is like this one: [Password reset error | Inventhora](https://inventhora.eu.auth0.com/u/reset-password?ticket=7APAjke3WDn7C7j3AgM0AVnLugzBmDUM9&state=g6Fo2SBXcjdlV2w0WW1qb0Z4VElQV2JXSFZhRmVIRmlRTWVpRKN0aWTZIENXRGhGdG01UFNNanlGeVFwQkc2c1kyTmtNVGJqNFd1o2NpZNkgU0RMdm1HdjVqMWJiRkFoanFFTFFOMnBzSG03MGJJa28#)

 ![Screenshot 2020-02-18 at 19.04.52](https://global.discourse-cdn.com/auth0/original/3X/3/6/3679ebdde359b5093ca9453550c8f3a626c1c363.png)

---

<div class="post-metadata">

**Author:** ![BjoernRave](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bjoernrave/32/18598_2.png) [@BjoernRave](https://community.auth0.com/u/BjoernRave)\
**Post date:** [February 29, 2020, 5:26pm UTC](https://community.auth0.com/t/redirect-rule-for-the-password-reset-page/38019/4 "2020-02-29T17:26:08Z")

</div>

@markd do you have anything I could try to make it work?

---

<div class="post-metadata">

**Author:** ![markd](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/markd/32/38919_2.png) [@markd](https://community.auth0.com/u/markd)\
**Post date:** [March 11, 2020, 4:20am UTC](https://community.auth0.com/t/redirect-rule-for-the-password-reset-page/38019/5 "2020-03-11T04:20:24Z")

</div>

Hi @BjoernRave,

Apologies for the late reply … I’ve been away working on other things. Unfortunately the error message doesn’t tell us much. I would suggest opening a support ticket with Auth0 if possible. If that is not an option, possible @konrad.sopala or @James.Morrison may be able to assist.

---

<div class="post-metadata">

**Author:** ![BjoernRave](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bjoernrave/32/18598_2.png) [@BjoernRave](https://community.auth0.com/u/BjoernRave)\
**Post date:** [March 18, 2020, 1:29pm UTC](https://community.auth0.com/t/redirect-rule-for-the-password-reset-page/38019/6 "2020-03-18T13:29:54Z")

</div>

Hey @markd,  
thanks for the reply. I can open a support ticket if you want, however all the info is there to reproduce thr problem right?

---

<div class="post-metadata">

**Author:** ![markd](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/markd/32/38919_2.png) [@markd](https://community.auth0.com/u/markd)\
**Post date:** [March 20, 2020, 2:12am UTC](https://community.auth0.com/t/redirect-rule-for-the-password-reset-page/38019/7 "2020-03-20T02:12:08Z")

</div>

I think so. I’m particularly interested in the “resume the flow” error. Again, sounds like something that would come from the rules processing engine, but the support engineers can confirm that and provide further guidance.

---

<div class="post-metadata">

**Author:** ![BjoernRave](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bjoernrave/32/18598_2.png) [@BjoernRave](https://community.auth0.com/u/BjoernRave)\
**Post date:** [March 21, 2020, 3:42pm UTC](https://community.auth0.com/t/redirect-rule-for-the-password-reset-page/38019/8 "2020-03-21T15:42:04Z")

</div>

Hey @markd, I contacted the support, but unfortunately my tial period already expired and I am currently on the free plan, so it seems like I won’t get any response from them 😑

Not sure in which direction I need to go with the info, that it’s coming from rules processing engine. Do you have any idea or hint for me, what I might need to change?

---

<div class="post-metadata">

**Author:** ![mobilmacher](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mobilmacher/32/13482_2.png) [@mobilmacher](https://community.auth0.com/u/mobilmacher)\
**Post date:** [August 20, 2020, 3:46pm UTC](https://community.auth0.com/t/redirect-rule-for-the-password-reset-page/38019/9 "2020-08-20T15:46:56Z")

</div>

I’m facing the same issue. The state param in the url seems to cause the problem, see:

> [@Problem redirecting users to reset password in a rule](https://community.auth0.com/t/problem-redirecting-users-to-reset-password-in-a-rule/46788/3):
>
> Hi @ariel1, There is no way to remove state from this transaction, as it is the mechanism for preventing CSRF. There is a way to do this though, and it is outlined here:

This [workaround](https://auth0.com/docs/rules/redirect-users?_ga=2.38730147.101215655.1595421114-1228832527.1591912785#force-password-change-example) doesn’t work for me, since I’m trying to redirect directly to the Auth0’s password reset page during the login process.

A workaround for this use case would be very helpful.

---

<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:** [August 20, 2020, 4:02pm UTC](https://community.auth0.com/t/redirect-rule-for-the-password-reset-page/38019/10 "2020-08-20T16:02:46Z")

</div>

@mobilmacher @BjoernRave

I don’t think there is currently a way to redirect directly to the hosted pw reset page in a redirect rule. The workaround is to call the management API and update the user’s pw manually. This would require hosting your own UI for the pw reset…I can see why this isn’t ideal.

Can you both please submit a feature request to our [feedback page](https://auth0.com/feedback)? This way our product managers see the request directly. Thanks!

---

<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:** [September 4, 2020, 4:02pm UTC](https://community.auth0.com/t/redirect-rule-for-the-password-reset-page/38019/11 "2020-09-04T16:02:48Z")

</div>

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