# How to add data (or query param) to redirect\_uri?

**URL:** <https://community.auth0.com/t/how-to-add-data-or-query-param-to-redirect-uri/91425>\
**Category:** Get Help\
**Tags:** login, auth0\
**Created:** [September 28, 2022, 2:53am UTC](https://community.auth0.com/t/how-to-add-data-or-query-param-to-redirect-uri/91425 "2022-09-28T02:53:32Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [September 30, 2022, 6:51pm UTC](https://community.auth0.com/t/how-to-add-data-or-query-param-to-redirect-uri/91425/2 "2022-09-30T18:51:00Z")

</div>

Hello @TheEWL welcome to the community!

What if you pass an object directly to `loginWithRedirect` as outlined in this post:

> [@Send custom params from auth0-spa-js loginWithRedirect() for using in rules](https://community.auth0.com/t/send-custom-params-from-auth0-spa-js-loginwithredirect-for-using-in-rules/63686/3):
>
> Hi @pratikpalse, Welcome to the Community! You need to pass an object. ({}) to the loginWithRedirect() method. You are currently passing an array ([]). For example: loginWithRedirect({foo:'bar'})

Alternatively, you could use the `appState` to achieve a similar result - As noted in the documentation:

> If you need to send custom parameters to the Authorization Server, make sure to use the original parameter name.

[https://auth0.github.io/auth0-spa-js/interfaces/redirectloginoptions.html#appstate](https://auth0.github.io/auth0-spa-js/interfaces/redirectloginoptions.html#appstate)

Hope this helps!

---

_[View the full topic](https://community.auth0.com/t/how-to-add-data-or-query-param-to-redirect-uri/91425)._
