# Empty event.request.body on pre user registration action

**URL:** <https://community.auth0.com/t/empty-event-request-body-on-pre-user-registration-action/149513>\
**Category:** Get Help\
**Tags:** auth0-spa-js, sdks-quickstarts\
**Created:** [October 10, 2024, 2:30am UTC](https://community.auth0.com/t/empty-event-request-body-on-pre-user-registration-action/149513 "2024-10-10T02:30:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![czf](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/czf/32/59858_2.png) [@czf](https://community.auth0.com/u/czf)\
**Post date:** [October 10, 2024, 2:30am UTC](https://community.auth0.com/t/empty-event-request-body-on-pre-user-registration-action/149513/1 "2024-10-10T02:30:21Z")

</div>

I’m including some custom parameters in my call to loginWithRedirect.  
I’m using the sample app.

```auto
const options = {
      authorizationParams: {
        redirect_uri: window.location.origin,
        invitation: <invite>,
        organization: <org>,
        screen_hint: 'signup',
        customParam: <custom_param_value>,,
      },
    };
await auth0Client.loginWithRedirect(options);

```

I expected the event of the `onExecutePreUserRegistration` to have the request.body populated with the custom parameters as described in the documentation. [Actions Triggers: pre-user-registration - Event Object (auth0.com)](https://auth0.com/docs/customize/actions/explore-triggers/signup-and-login-triggers/pre-user-registration-trigger/pre-user-registration-event-object). However when I use the web task logs extension to print out the event object the body is empty. Am I interpreting the documentation for this action incorrectly?

---

<div class="post-metadata">

**Author:** ![tudor.smeu](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/tudor.smeu/32/59767_2.png) [@tudor.smeu](https://community.auth0.com/u/tudor.smeu)\
**Post date:** [October 10, 2024, 1:57pm UTC](https://community.auth0.com/t/empty-event-request-body-on-pre-user-registration-action/149513/3 "2024-10-10T13:57:21Z")

</div>

Hello @czf,

Welcome to the Auth0 community!

In order to pass the `authorizationParams` correctly you also need to provide required parameters. These are:

```auto
response_type: "id_token",
response_mode: "form_post",
scope: "openid profile email"

```

After adding these into `authorizationParams`, you should add your custom ones and they should be passed forward.

I hope this was helpful.

Thanks,  
Tudor

---

<div class="post-metadata">

**Author:** ![czf](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/czf/32/59858_2.png) [@czf](https://community.auth0.com/u/czf)\
**Post date:** [October 10, 2024, 4:43pm UTC](https://community.auth0.com/t/empty-event-request-body-on-pre-user-registration-action/149513/4 "2024-10-10T16:43:45Z")

</div>

I don’t see all of those listed in the doc for the authorizationParams.  
scope is listed as optional  
[AuthorizationParams | @auth0/auth0-spa-js](https://auth0.github.io/auth0-spa-js/interfaces/AuthorizationParams.html)

---

<div class="post-metadata">

**Author:** ![czf](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/czf/32/59858_2.png) [@czf](https://community.auth0.com/u/czf)\
**Post date:** [October 10, 2024, 7:45pm UTC](https://community.auth0.com/t/empty-event-request-body-on-pre-user-registration-action/149513/5 "2024-10-10T19:45:27Z")

</div>

Looking at the source for auth0-spa-js, `response_mode` doesn’t come from `authorizationParams` it comes from `authorizationOptions` which there doesn’t seem to be a way to set that.

---

<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:** [October 24, 2024, 7:45pm UTC](https://community.auth0.com/t/empty-event-request-body-on-pre-user-registration-action/149513/6 "2024-10-24T19:45:28Z")

</div>

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