# Receive params in Pre User Registration Action

**URL:** <https://community.auth0.com/t/receive-params-in-pre-user-registration-action/123340>\
**Category:** Get Help\
**Tags:** new-universal-login-experience, login-experience\
**Created:** [December 19, 2023, 8:04am UTC](https://community.auth0.com/t/receive-params-in-pre-user-registration-action/123340 "2023-12-19T08:04:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexandro.oliveira](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/alexandro.oliveira/32/48573_2.png) [@alexandro.oliveira](https://community.auth0.com/u/alexandro.oliveira)\
**Post date:** [December 19, 2023, 8:04am UTC](https://community.auth0.com/t/receive-params-in-pre-user-registration-action/123340/1 "2023-12-19T08:04:43Z")

</div>

I was searching how to pass data or query to pre registration flow, but i found another topic talking about it: [Accessing Query String Parameters in a Pre-User Registration Action](https://community.auth0.com/t/accessing-query-string-parameters-in-a-pre-user-registration-action/122322)

The way i found to do that is using:

```auto
loginWithRedirect({
    redirectUri: callbackUri,
    scope: 'openid profile email custom:meta',
})

```

So, i can access the array in `event.transaction.requested_scopes` and do something based on that.

Documentation ref:

> **[Pre User Registration Flow](https://auth0.com/docs/customize/actions/flows-and-triggers/pre-user-registration-flow)**
>
> Learn about the Pre User Registration Flow, which runs when a user attempts to register through a Database or Passwordless connection. It can be used to add metadata to the user profile before it is created or to deny a registration.

But probabily is not the best approach.

Can someone guide me, if is possible to pass a object or string custom to this flow?

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [December 19, 2023, 11:28am UTC](https://community.auth0.com/t/receive-params-in-pre-user-registration-action/123340/2 "2023-12-19T11:28:05Z")

</div>

Hi @alexandro.oliveira , welcome to Auth0!

> [@alexandro.oliveira](#):
>
> So, i can access the array in `event.transaction.requested_scopes` and do something based on that.

This approach is valid and documented.

`scope` and the corresponding `requested_scopes` is a standard param.

The doc ([Accessing Query String Parameters in a Pre-User Registration Action](https://community.auth0.com/t/accessing-query-string-parameters-in-a-pre-user-registration-action/122322)) refers to additional key:value query parameters added to the /authorize request.

For reference, to see what I mean by additional key:value query parameters, please take a look at this topic: [Oauth/token request payload custom key/values](https://community.auth0.com/t/oauth-token-request-payload-custom-key-values/122098)

Please let me know if we can answer any other questions on this topic!

---

<div class="post-metadata">

**Author:** ![alexandro.oliveira](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/alexandro.oliveira/32/48573_2.png) [@alexandro.oliveira](https://community.auth0.com/u/alexandro.oliveira)\
**Post date:** [December 19, 2023, 11:41am UTC](https://community.auth0.com/t/receive-params-in-pre-user-registration-action/123340/3 "2023-12-19T11:41:24Z")

</div>

> [@marcelina.barycka](#):
>
> documented

From what I understood, indeed, apart from the `scope`, it is not possible to pass dynamic objects or strings to the pre-registration, right?

And regarding being `documented`, does that mean this approach is recommended for this case?

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [December 19, 2023, 12:20pm UTC](https://community.auth0.com/t/receive-params-in-pre-user-registration-action/123340/4 "2023-12-19T12:20:13Z")

</div>

Hi @alexandro.oliveira , I updated the link to the ref topic in my last replay.

> [@alexandro.oliveira](#):
>
> From what I understood, indeed, apart from the `scope`, it is not possible to pass dynamic objects or strings to the pre-registration, right?

That’s right. In the pre-user-registration flow, you can reference to the request context data listed here: [Actions Triggers: pre-user-registration - Event Object](https://auth0.com/docs/customize/actions/flows-and-triggers/pre-user-registration-flow/event-object)

> [@alexandro.oliveira](#):
>
> And regarding being `documented`, does that mean this approach is recommended for this case?

The requested\_scopes is one of the supported methods and it can be used in the flow.

---

<div class="post-metadata">

**Author:** ![alexandro.oliveira](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/alexandro.oliveira/32/48573_2.png) [@alexandro.oliveira](https://community.auth0.com/u/alexandro.oliveira)\
**Post date:** [December 19, 2023, 12:32pm UTC](https://community.auth0.com/t/receive-params-in-pre-user-registration-action/123340/5 "2023-12-19T12:32:16Z")

</div>

Ok, for this topic, this is enough.

Thanks for supporting me.

---

<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:** [January 2, 2024, 12:32pm UTC](https://community.auth0.com/t/receive-params-in-pre-user-registration-action/123340/6 "2024-01-02T12:32:39Z")

</div>

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