# Auth0 actions not receiving param

**URL:** <https://community.auth0.com/t/auth0-actions-not-receiving-param/185804>\
**Category:** Get Help\
**Tags:** user-password-management, user-management\
**Created:** [April 22, 2025, 3:58pm UTC](https://community.auth0.com/t/auth0-actions-not-receiving-param/185804 "2025-04-22T15:58:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![camilo.mafioly](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/camilo.mafioly/32/74423_2.png) [@camilo.mafioly](https://community.auth0.com/u/camilo.mafioly)\
**Post date:** [April 22, 2025, 3:58pm UTC](https://community.auth0.com/t/auth0-actions-not-receiving-param/185804/1 "2025-04-22T15:58:01Z")

</div>

im using @auth0/nextjs-auth0/server and everything works correctly but when trying to set up a param for the actions in auth0. Ive tried doing:

in custom api/auth0/register route

```auto
// src/app/api/auth0/login/route.ts
import { auth0 } from '@/lib/services/auth0';
import { NextRequest } from 'next/server';

export async function GET(request: NextRequest) {
  const origin = request.nextUrl.origin;
  // const partner = request.nextUrl.searchParams.get('partner') ?? 'my pepe';
  const partner = 'testttttt';
  const internalAuth0 = auth0(origin);

  return internalAuth0.startInteractiveLogin({
    authorizationParameters: {
      screen_hint: 'signup',
      partner,
    },
  });
}

```

in built in auth0 route

```auto
/auth/login?screen_hint=signup&partner=exampleTestPartner

```

but neither of them works when logging the partner in my actions

```auto
/**
* Handler that will be called during the execution of a PreUserRegistration flow.
*
* @param {Event} event - Details about the context and user that is attempting to register.
* @param {PreUserRegistrationAPI} api - Interface whose methods can be used to change the behavior of the signup.
*/
exports.onExecutePreUserRegistration = async (event, api) => {
  const partner = event.request?.query?.partner;
  console.log('🌟 partner from query:', partner);
  console.log('🧾 full request query:', event.request?.query);
  console.log('event', event)
  console.log('api', api)

  if (partner) {
    api.user.setUserMetadata("partner", partner);
  }
};

```

it only logs undefined for `event.request?.query` and` partner` in the monitors in both cases. How can I make this work? Im using Nextjs server with client

this is my auth0 setup

```auto
import { Auth0Client } from '@auth0/nextjs-auth0/server';

export const auth0 = (baseUrl: string) => {
  return new Auth0Client({
    domain: process.env.AUTH0_CUSTOM_DOMAIN,
    clientId: process.env.AUTH0_CLIENT_ID!,
    clientSecret: process.env.AUTH0_CLIENT_SECRET!,
    appBaseUrl: baseUrl,
    secret: process.env.AUTH0_SECRET!,
  });
};

```

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [April 22, 2025, 4:06pm UTC](https://community.auth0.com/t/auth0-actions-not-receiving-param/185804/3 "2025-04-22T16:06:39Z")

</div>

Hi @camilo.mafioly

Welcome to the Auth0 Community!

Unfortunately, there is no out-of-the-box solution to pass parameters as additional query parameters in order to be accessible in an `PreUserRegistration` Action as mentioned in this [knowledge article](https://community.auth0.com/t/accessing-query-string-parameters-in-a-pre-user-registration-action/122322).

You could attempt a potential workaround by adding a hidden input using prompts mentioned in [this community post](https://community.auth0.com/t/passing-custom-parameters-to-pre-registration-action/139321).

If you have any other questions, let me know!

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![camilo.mafioly](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/camilo.mafioly/32/74423_2.png) [@camilo.mafioly](https://community.auth0.com/u/camilo.mafioly)\
**Post date:** [April 22, 2025, 4:09pm UTC](https://community.auth0.com/t/auth0-actions-not-receiving-param/185804/4 "2025-04-22T16:09:49Z")

</div>

Thanks a lot for your fast response. This is really helpful but just 1 question, where do i create this input? Is there an option in auth0 for this?

---

<div class="post-metadata">

**Author:** ![camilo.mafioly](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/camilo.mafioly/32/74423_2.png) [@camilo.mafioly](https://community.auth0.com/u/camilo.mafioly)\
**Post date:** [April 22, 2025, 4:14pm UTC](https://community.auth0.com/t/auth0-actions-not-receiving-param/185804/5 "2025-04-22T16:14:05Z")

</div>

im using an a tag for now

```auto
  <a
        href="/auth/login?screen_hint=signup"
      >

```

---

<div class="post-metadata">

**Author:** ![camilo.mafioly](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/camilo.mafioly/32/74423_2.png) [@camilo.mafioly](https://community.auth0.com/u/camilo.mafioly)\
**Post date:** [April 22, 2025, 4:19pm UTC](https://community.auth0.com/t/auth0-actions-not-receiving-param/185804/6 "2025-04-22T16:19:32Z")

</div>

This can be used in the new universal login or the custom one?

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [April 22, 2025, 4:28pm UTC](https://community.auth0.com/t/auth0-actions-not-receiving-param/185804/7 "2025-04-22T16:28:09Z")

</div>

You will need to add a custom prompt under one of the available page templates under Branding → Universal Login → Advanced

These custom page templates are using the Universal Login.

Kind Regards,  
Nik

---

<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:** [May 6, 2025, 4:28pm UTC](https://community.auth0.com/t/auth0-actions-not-receiving-param/185804/8 "2025-05-06T16:28:14Z")

</div>

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