# Dynamic password reset page based on query params

**URL:** <https://community.auth0.com/t/dynamic-password-reset-page-based-on-query-params/66211>\
**Category:** Get Help\
**Created:** [July 15, 2021, 10:39am UTC](https://community.auth0.com/t/dynamic-password-reset-page-based-on-query-params/66211 "2021-07-15T10:39:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chinds](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/chinds/32/25410_2.png) [@chinds](https://community.auth0.com/u/chinds)\
**Post date:** [July 15, 2021, 10:39am UTC](https://community.auth0.com/t/dynamic-password-reset-page-based-on-query-params/66211/1 "2021-07-15T10:39:59Z")

</div>

I am following the invite user flow where a user account can be created via the management API and then sending the password change ticket to the new user via email.

The docs seem to suggest that you can modify the password reset page based on query params after the `#` in the url. However there doesn’t seem to be any default way to do this in the password reset template.

Are we expected to use vanilla JS within the page template to access the query params ourselves and modify the template that way?

---

<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:** [July 15, 2021, 4:45pm UTC](https://community.auth0.com/t/dynamic-password-reset-page-based-on-query-params/66211/3 "2021-07-15T16:45:22Z")

</div>

> [@chinds](#):
>
> Are we expected to use vanilla JS within the page template to access the query params ourselves and modify the template that way?

Yes that is correct, that doc is suggesting you pass a query param and use that param to make whatever changes you would like to the password reset page.

---

<div class="post-metadata">

**Author:** ![chinds](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/chinds/32/25410_2.png) [@chinds](https://community.auth0.com/u/chinds)\
**Post date:** [July 16, 2021, 9:20am UTC](https://community.auth0.com/t/dynamic-password-reset-page-based-on-query-params/66211/4 "2021-07-16T09:20:55Z")

</div>

Thanks, so for others wondering this is what I have done.

In the `<script>` element at the bottom of the page template I added the following;

```auto
 var href = window.location.href
 var qsParams = href.substring(href.indexOf("#") + 1);
 var parsedQsParams = new URLSearchParams(qsParams);
 var isInvite = parsedQsParams.get('type') === "invite"

```

the `isInvite` var is then used in the `dict` below to set the content values e.g.

`title: isInvite ? "Set a password" : "Change Password",`

---

<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:** [July 16, 2021, 6:10pm UTC](https://community.auth0.com/t/dynamic-password-reset-page-based-on-query-params/66211/5 "2021-07-16T18:10:03Z")

</div>

Thanks for providing your solution!

---

<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:** [July 31, 2021, 6:10pm UTC](https://community.auth0.com/t/dynamic-password-reset-page-based-on-query-params/66211/6 "2021-07-31T18:10:18Z")

</div>

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