# Append query param to an existing /authorize transaction

**URL:** <https://community.auth0.com/t/append-query-param-to-an-existing-authorize-transaction/58515>\
**Category:** Get Help\
**Tags:** authorization, oauth, query-parameters, custom-param\
**Created:** [February 25, 2021, 2:06pm UTC](https://community.auth0.com/t/append-query-param-to-an-existing-authorize-transaction/58515 "2021-02-25T14:06:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mamacdon](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mamacdon/32/23196_2.png) [@mamacdon](https://community.auth0.com/u/mamacdon)\
**Post date:** [February 25, 2021, 2:06pm UTC](https://community.auth0.com/t/append-query-param-to-an-existing-authorize-transaction/58515/1 "2021-02-25T14:06:08Z")

</div>

I have a hosted login page that offers the user a choice between signup and login experiences. I want the user’s choice (signup or login) to end up in the `context.request.query` object of my Auth0 Rule, so I can use it to enrich the token, [as explained here](https://community.auth0.com/t/send-custom-params-on-login-with-user-and-password/50032/8).

However, Auth0 seems to ignore any changes to query parameters that occur after the initial `/authorize` transaction starts. For example, suppose my app constructs this URL:

[https://my-tenant.auth0.com/authorize?state=s&client=c&redirect\_uri=r&protocol=oauth2&response\_type=code&response\_mode=query](https://my-tenant.auth0.com/authorize?state=s&client=c&redirect_uri=r&protocol=oauth2&response_type=code&response_mode=query)

If I then append `&choice=signup`, it is ignored. It seems that the oauth params are “fixed” when the state is set, and cannot be changed afterward.

Is there any way to do this? Essentially what I’m asking for is a way to append extra params to an authorize transaction that’s already been created.

---

<div class="post-metadata">

**Author:** ![nicolas\_sabena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolas_sabena/32/6064_2.png) [@nicolas\_sabena](https://community.auth0.com/u/nicolas_sabena)\
**Post date:** [February 27, 2021, 7:19pm UTC](https://community.auth0.com/t/append-query-param-to-an-existing-authorize-transaction/58515/2 "2021-02-27T19:19:56Z")

</div>

Hi @mamacdon  
There’s no way to pass data from the hosted login page to a rule. `context.request.query` sees only the parameters included in the original `/authorize` request initiated in the app.

If you are trying to check if the user has just signed up, maybe there are other approaches you can take, like check for a metadata flag in the rule. E.g.

```auto
if (user.app_metadata && user.app_metadata.first_login_processed) {
  return callback(null, user, context);
}
// this is the first time we see the user (signup)
// do something
[...]
// and set the user's app_metadata.login_processed = true, so that
// this won't execute next time
[...]

```

Hope this helps!

---

<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:** [March 1, 2021, 7:49am UTC](https://community.auth0.com/t/append-query-param-to-an-existing-authorize-transaction/58515/3 "2021-03-01T07:49:14Z")

</div>

Thanks for helping on this one Nico!

---

<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:** [March 16, 2021, 7:49am UTC](https://community.auth0.com/t/append-query-param-to-an-existing-authorize-transaction/58515/4 "2021-03-16T07:49:56Z")

</div>

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