# When using React Auth0 sdk, how to pass query string param to login URL

**URL:** <https://community.auth0.com/t/when-using-react-auth0-sdk-how-to-pass-query-string-param-to-login-url/66670>\
**Category:** Get Help\
**Created:** [July 23, 2021, 2:20pm UTC](https://community.auth0.com/t/when-using-react-auth0-sdk-how-to-pass-query-string-param-to-login-url/66670 "2021-07-23T14:20:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hello10](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hello10/32/13404_2.png) [@hello10](https://community.auth0.com/u/hello10)\
**Post date:** [July 23, 2021, 2:20pm UTC](https://community.auth0.com/t/when-using-react-auth0-sdk-how-to-pass-query-string-param-to-login-url/66670/1 "2021-07-23T14:20:31Z")

</div>

Hi,

I am using react SDK `loginWithRedirect` to send the user to the login form. I would like to pass an extra parameter to the login form URL so that I can use it to customise the form (toggle on/off some fields). Is there a way to do so?

Thanks,  
Emmanuel

---

<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 23, 2021, 10:14pm UTC](https://community.auth0.com/t/when-using-react-auth0-sdk-how-to-pass-query-string-param-to-login-url/66670/3 "2021-07-23T22:14:41Z")

</div>

Hi @hello10,

You can pass extra params like this:

```auto
loginWithRedirect({ foo:'bar' })
```

---

<div class="post-metadata">

**Author:** ![hello10](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hello10/32/13404_2.png) [@hello10](https://community.auth0.com/u/hello10)\
**Post date:** [July 24, 2021, 7:32am UTC](https://community.auth0.com/t/when-using-react-auth0-sdk-how-to-pass-query-string-param-to-login-url/66670/4 "2021-07-24T07:32:34Z")

</div>

Indeed, this is my bad I missed the parameters in the form URL and assumed they were removed somehow

---

<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 26, 2021, 3:06pm UTC](https://community.auth0.com/t/when-using-react-auth0-sdk-how-to-pass-query-string-param-to-login-url/66670/5 "2021-07-26T15:06:31Z")

</div>

No problem! Glad it was resolved.

---

<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:** [August 10, 2021, 3:07pm UTC](https://community.auth0.com/t/when-using-react-auth0-sdk-how-to-pass-query-string-param-to-login-url/66670/6 "2021-08-10T15:07:17Z")

</div>

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