# Changing redirect URL to a POST rather than a GET with PII in the url

**URL:** <https://community.auth0.com/t/changing-redirect-url-to-a-post-rather-than-a-get-with-pii-in-the-url/43779>\
**Category:** Get Help\
**Tags:** password-reset, redirect-rules\
**Created:** [May 29, 2020, 1:42am UTC](https://community.auth0.com/t/changing-redirect-url-to-a-post-rather-than-a-get-with-pii-in-the-url/43779 "2020-05-29T01:42:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sthakur](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sthakur/32/12715_2.png) [@sthakur](https://community.auth0.com/u/sthakur)\
**Post date:** [May 29, 2020, 1:42am UTC](https://community.auth0.com/t/changing-redirect-url-to-a-post-rather-than-a-get-with-pii-in-the-url/43779/1 "2020-05-29T01:42:25Z")

</div>

This is a duplicate of this ticket (with some more information) which did not have a resolution and was closed: [Auth0 adding personally identifiable information to redirect URL](http://community.auth0.com/t/auth0-adding-personally-identifiable-information-to-redirect-url/6425)  
We are using the Auth0 hosted password reset page and after a successfult password reset the user is being redirected back to our sign-in page:

See: _Dashboard → Emails → Templates → Redirect To_

The redirect url generated by Auth0 included PII (personally identifiable information) in the form of the users email and a message:

```auto
http://mydomain.com/users/sign_in?email=user@email.com&message=You%20can%20now%20login%20to%20the%20application%20with%20the%20new%20password.

```

This information ends up in Google Analytics and is a violation of the TOS:

> **[\[UA\] Universal Analytics usage guidelines \[Legacy\] - Analytics Help](https://support.google.com/analytics/answer/2795983?hl=en)**
>
> You are viewing a legacy article about Universal Analytics. Learn more about Google Analytics 4 replacing Universal Analytics. The following cond

It also just a bad idea to include a user’s email in a plain URL and a message which can be hijacked into making the user believe something else.

**How can we prevent the redirect URL from containing the user’s email and message? Is there anyway to send these parmeters as part of a request body using the POST action rather than a GET. This is coming as part of an internal security audit from one of our clients**

---

<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:** [May 29, 2020, 7:55pm UTC](https://community.auth0.com/t/changing-redirect-url-to-a-post-rather-than-a-get-with-pii-in-the-url/43779/2 "2020-05-29T19:55:34Z")

</div>

Hello @sthakur,

Welcome to the Community. I would suggest submitting this to the feedback link as well:

> **[Auth0: Secure access for everyone. But not just anyone.](https://auth0.com/feedback)**
>
> Rapidly integrate authentication and authorization for web, mobile, and legacy applications so you can focus on your core business.

---

<div class="post-metadata">

**Author:** ![andy.carter](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/andy.carter/32/27949_2.png) [@andy.carter](https://community.auth0.com/u/andy.carter)\
**Post date:** [June 1, 2020, 1:30pm UTC](https://community.auth0.com/t/changing-redirect-url-to-a-post-rather-than-a-get-with-pii-in-the-url/43779/3 "2020-06-01T13:30:08Z")

</div>

Hi @sthakur,

You can remove the email address from the URL by updating your email templates:

> [@How to disable "Include Email In Redirect"?](http://community.auth0.com/t/how-to-disable-include-email-in-redirect/43139/2):
>
> Hello, It is possible to disable the “includeEmailInRedirect” flag for your email template by using the “Patch an Email Template” PATCH /api/v2/email-templates/{templateName} ([Auth0 Management API v2](https://auth0.com/docs/api/management/v2#!/Email_Templates/patch_email_templates_by_templateName)) endpoint in the Management API. You will need to select the template you would like to change and include the following in the body of this call: { "includeEmailInRedirect": false }

---

<div class="post-metadata">

**Author:** ![sthakur](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sthakur/32/12715_2.png) [@sthakur](https://community.auth0.com/u/sthakur)\
**Post date:** [June 1, 2020, 10:24pm UTC](https://community.auth0.com/t/changing-redirect-url-to-a-post-rather-than-a-get-with-pii-in-the-url/43779/4 "2020-06-01T22:24:29Z")

</div>

Hi @andy.carter,

Thanks for the response. I do have one follow-up question:

Do I have to PATCH this one time only for every Auth0 appliance that I have? Or will this need to be done everytime when the instance is restarted?

Thanks,  
Sagar Thakur

---

<div class="post-metadata">

**Author:** ![sthakur](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sthakur/32/12715_2.png) [@sthakur](https://community.auth0.com/u/sthakur)\
**Post date:** [June 1, 2020, 10:56pm UTC](https://community.auth0.com/t/changing-redirect-url-to-a-post-rather-than-a-get-with-pii-in-the-url/43779/5 "2020-06-01T22:56:42Z")

</div>

Hi @andy.carter,

I tried using the API Explorer as well as Postman to PATCH the email template but i am getting the following response:

{  
“statusCode”: 404,  
“error”: “Not Found”,  
“message”: “The template does not exist and cannot be updated.”,  
“errorCode”: “inexistent\_email\_template”  
}

---

<div class="post-metadata">

**Author:** ![andy.carter](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/andy.carter/32/27949_2.png) [@andy.carter](https://community.auth0.com/u/andy.carter)\
**Post date:** [June 3, 2020, 3:43pm UTC](https://community.auth0.com/t/changing-redirect-url-to-a-post-rather-than-a-get-with-pii-in-the-url/43779/6 "2020-06-03T15:43:12Z")

</div>

Hi @sthakur,

You should just need to patch this once via the management API. With regards to the 404, please check you are using **reset\_email** for the templateName parameter rather than **password\_reset** or **change\_password** , which are only present for legacy reasons.

---

<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:** [June 18, 2020, 3:43pm UTC](https://community.auth0.com/t/changing-redirect-url-to-a-post-rather-than-a-get-with-pii-in-the-url/43779/7 "2020-06-18T15:43:15Z")

</div>

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