# TypeError on pre-user-registration: Cannot read properties of undefined (reading 'render')

**URL:** <https://community.auth0.com/t/typeerror-on-pre-user-registration-cannot-read-properties-of-undefined-reading-render/140653>\
**Category:** Get Help\
**Tags:** signup-prompt-new-experience, login-experience\
**Created:** [August 8, 2024, 4:16am UTC](https://community.auth0.com/t/typeerror-on-pre-user-registration-cannot-read-properties-of-undefined-reading-render/140653 "2024-08-08T04:16:53Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ngitman](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@ngitman](https://community.auth0.com/u/ngitman)\
**Post date:** [August 8, 2024, 4:16am UTC](https://community.auth0.com/t/typeerror-on-pre-user-registration-cannot-read-properties-of-undefined-reading-render/140653/1 "2024-08-08T04:16:53Z")

</div>

I am using Forms and Flow to set up additional details for sign-up. I made a form that asks the user trying to register for additional details that will automatically update the metadata. For the Flow, I have selected for the flow to be executed on pre-user-registration. However, while pasting the “render” code given by forms, I got an error that said “prompt” in “api.prompt.render(FORM\_ID);” was undefined. However, this is not an issue for the on-log-in state, but I am only trying to add this flow for user registration.

So, when I tried to register a new user, I got an “Extensibility error” on the Password box and got a TypeError on logs.

Please help.

---

<div class="post-metadata">

**Author:** ![gparascandolo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gparascandolo/32/38788_2.png) [@gparascandolo](https://community.auth0.com/u/gparascandolo)\
**Post date:** [August 8, 2024, 2:18pm UTC](https://community.auth0.com/t/typeerror-on-pre-user-registration-cannot-read-properties-of-undefined-reading-render/140653/3 "2024-08-08T14:18:54Z")

</div>

hey @ngitman 👋

Forms for Actions is currently only available for the Post-Login flow, you cannot use it for the Pre User Registration flow. See the “Restrictions and limitations” in this documentation - [Render Forms using Actions](https://auth0.com/docs/customize/forms/render#restrictions-and-limitations)

If you need to render forms on user registrations only, you can add logic to a Post-Login action to detect if it is the user’s first login request using something like below:

```auto
exports.onExecutePostLogin = async (event, api) => {
    // Skip user with more than one login count, or if this is a refresh token exchange or silent auth request
    const not_first_login = event.stats.logins_count > 1 ||
                            event.transaction?.protocol === 'oauth2-refresh-token' ||
                            event.request.query?.prompt === 'none';

    if (not_first_login) {
        return;
    }

    // Add your logic to render the form
}

exports.onContinuePostLogin = async (event, api) => {
  // Add your logic after completing the form
}

```

Note: this is not “official” code from Auth0 by Okta, so please test to ensure it fits your needs ^

---

<div class="post-metadata">

**Author:** ![ngitman](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@ngitman](https://community.auth0.com/u/ngitman)\
**Post date:** [August 8, 2024, 9:42pm UTC](https://community.auth0.com/t/typeerror-on-pre-user-registration-cannot-read-properties-of-undefined-reading-render/140653/4 "2024-08-08T21:42:40Z")

</div>

Hi, this worked, thank you!

---

<div class="post-metadata">

**Author:** ![gparascandolo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gparascandolo/32/38788_2.png) [@gparascandolo](https://community.auth0.com/u/gparascandolo)\
**Post date:** [August 9, 2024, 2:46pm UTC](https://community.auth0.com/t/typeerror-on-pre-user-registration-cannot-read-properties-of-undefined-reading-render/140653/5 "2024-08-09T14:46:31Z")

</div>

Great to hear this works for you! 🙂

---

<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 9, 2025, 5:21pm UTC](https://community.auth0.com/t/typeerror-on-pre-user-registration-cannot-read-properties-of-undefined-reading-render/140653/6 "2025-05-09T17:21:22Z")

</div>

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