# Updating context.request.query.redirect\_uri in rules

**URL:** <https://community.auth0.com/t/updating-context-request-query-redirect-uri-in-rules/42784>\
**Category:** Get Help\
**Tags:** rules, auth0\
**Created:** [May 11, 2020, 9:02pm UTC](https://community.auth0.com/t/updating-context-request-query-redirect-uri-in-rules/42784 "2020-05-11T21:02:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shubham.goyal](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/shubham.goyal/32/14127_2.png) [@shubham.goyal](https://community.auth0.com/u/shubham.goyal)\
**Post date:** [May 11, 2020, 9:02pm UTC](https://community.auth0.com/t/updating-context-request-query-redirect-uri-in-rules/42784/1 "2020-05-11T21:02:01Z")

</div>

Hi,

I am looking for a way to add a query parameter in redirect\_uri coming with request. it might be a way to do this is update context.request.query.redirect\_uri in rules. I dont think its possible but still

```auto
function update_rediirect (user, context, callback) {
  context.request.query.redirect_uri = context.request.query.redirect_uri + '?param=value';
  callback(null, user, context)
}

```

Is there any other way to achieve this?

Thanks.

---

<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:** [May 12, 2020, 4:41pm UTC](https://community.auth0.com/t/updating-context-request-query-redirect-uri-in-rules/42784/3 "2020-05-12T16:41:32Z")

</div>

Hi @shubham.goyal,

Depending on what you are trying to accomplish here, you may be better off adding this data as a custom claim.

> **[Sample Use Cases: Scopes and Claims](https://auth0.com/docs/get-started/apis/scopes/sample-use-cases-scopes-and-claims)**
>
> Learn how to use scopes and claims with applications and APIs.

If this doesn’t work for you, can you share more info about what you are trying to accomplish?

---

<div class="post-metadata">

**Author:** ![shubham.goyal](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/shubham.goyal/32/14127_2.png) [@shubham.goyal](https://community.auth0.com/u/shubham.goyal)\
**Post date:** [May 12, 2020, 4:55pm UTC](https://community.auth0.com/t/updating-context-request-query-redirect-uri-in-rules/42784/4 "2020-05-12T16:55:57Z")

</div>

Thanks @dan.woda thats a good idea.

---

<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:** [May 12, 2020, 4:58pm UTC](https://community.auth0.com/t/updating-context-request-query-redirect-uri-in-rules/42784/5 "2020-05-12T16:58:48Z")

</div>

Let me know if you have any more questions about it.

---

<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:** [May 27, 2020, 4:58pm UTC](https://community.auth0.com/t/updating-context-request-query-redirect-uri-in-rules/42784/6 "2020-05-27T16:58:52Z")

</div>

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