# How do I configure custom forms during the sign up process?

**URL:** <https://community.auth0.com/t/how-do-i-configure-custom-forms-during-the-sign-up-process/130742>\
**Category:** Get Help\
**Tags:** new-universal-login-experience, login-experience\
**Created:** [March 28, 2024, 4:15pm UTC](https://community.auth0.com/t/how-do-i-configure-custom-forms-during-the-sign-up-process/130742 "2024-03-28T16:15:56Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![whoareyou](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@whoareyou](https://community.auth0.com/u/whoareyou)\
**Post date:** [March 28, 2024, 4:15pm UTC](https://community.auth0.com/t/how-do-i-configure-custom-forms-during-the-sign-up-process/130742/1 "2024-03-28T16:15:56Z")

</div>

I was planning on using this as a reference but ran into an issue where I can’t make API calls.

> **[Customizations for Signup and Login are Generally Available](https://auth0.com/blog/customizations-for-signup-and-login-are-generally-available/)**
>
> Businesses using Auth0 by Okta’s Universal Login, can leverage a pro-code option to customize signup and login flows to address unique ne...

I tried following the steps outlined but ran into an issue when I went to create a partial via this API

[https://tenant/api/v2/prompts/signup/partials](https://tenant/api/v2/prompts/signup/partials)

I got the following error:

{“statusCode”:400,“error”:“Bad Request”,“message”:“This feature requires at least one custom domain to be configured for the tenant.”}

I presume I have to sign up for a plan to implement this.

This should work for the terms and conditions but am unable to test as I have yet to sign up for a plan.

```auto
  api.user.setUserMetadata("termsAcceptance", terms);

```

Before I do this, I’d like confirmation on the proper implementation of a marketing optin on user sign up.  
**For the marketing Opt-In, is there an event for post user registration?** The example only shows: onExecutePreUserRegistration

**Do actions allow for post requests via fetch or XMLHttpRequest to a third-party link? Will I run into any CORS issues?**

**Is the user email available via the api.user object or do I need to use the event.request object in the post registration event?**

I’m presuming Actions are JS scripts that can be executed during a flow but unsure if they run in a user’s browser or if they run in a node instance on Auth0’s servers.

Is this the best approach or is there a better way with the new Universal Login? I need to take the user’s email address and if they opt-in send it to a marketing provider via a REST API call.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [March 29, 2024, 1:27am UTC](https://community.auth0.com/t/how-do-i-configure-custom-forms-during-the-sign-up-process/130742/3 "2024-03-29T01:27:52Z")

</div>

Hey there @whoareyou welcome to the community!

> [@whoareyou](#):
>
> I presume I have to sign up for a plan to implement this.
> 
> This should work for the terms and conditions but am unable to test as I have yet to sign up for a plan.

That is correct, you’ll need to configure a [custom domain](https://auth0.com/docs/customize/custom-domains) which does require a paid subscription.

> [@whoareyou](#):
>
> **For the marketing Opt-In, is there an event for post user registration?** The example only shows: onExecutePreUserRegistration

The `event.request.body` object is not available in a Post User Registration Action, Only Pre User Registration and Post Login.

> [@whoareyou](#):
>
> Do actions allow for post requests via fetch or XMLHttpRequest to a third-party link? Will I run into any CORS issues?

As Actions exist in a Node environment, you can certainly use fetch or other similar Javascript libraries. As Actions are run server-side, you won’t need to worry about CORS issues.

> [@whoareyou](#):
>
> Is the user email available via the api.user object or do I need to use the event.request object in the post registration event?

You should be able to utilize `event.user.email`

> [@whoareyou](#):
>
> I’m presuming Actions are JS scripts that can be executed during a flow but unsure if they run in a user’s browser or if they run in a node instance on Auth0’s servers.

You are correct in that Actions are run during specific auth transactions - They run in a node instance on Auth0’s servers as opposed to a user’s browser.

> [@whoareyou](#):
>
> Is this the best approach or is there a better way with the new Universal Login? I need to take the user’s email address and if they opt-in send it to a marketing provider via a REST API call.

Actions are indeed the best way to achieve what you are looking to do 🙂

---

<div class="post-metadata">

**Author:** ![whoareyou](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@whoareyou](https://community.auth0.com/u/whoareyou)\
**Post date:** [March 29, 2024, 3:59am UTC](https://community.auth0.com/t/how-do-i-configure-custom-forms-during-the-sign-up-process/130742/4 "2024-03-29T03:59:54Z")

</div>

Thank you for the quick follow up!  
I found some documentation today that is directly applicable for future users needing this.  
I should be able to use the code found at the bottom of this to resolve this functionality.  
[https://auth0.com/docs/customize/actions/flows-and-triggers/post-user-registration-flow](https://auth0.com/docs/customize/actions/flows-and-triggers/post-user-registration-flow)

I should be able to perform a request to the provider using this exact code.

```auto
const axios = require("axios");

/**
 * @param {Event} event - Details about registration event.
 */
exports.onExecutePostUserRegistration = async (event) => {
  await axios.post("https://my-api.exampleco.com/users", { params: { email: event.user.email }});
};

```

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [March 29, 2024, 7:46pm UTC](https://community.auth0.com/t/how-do-i-configure-custom-forms-during-the-sign-up-process/130742/5 "2024-03-29T19:46:16Z")

</div>

No problem, happy to help!

Thanks for sharing - Yes! That will work to ping an external service and is will work out of the box, no custom domain required.

---

<div class="post-metadata">

**Author:** ![whoareyou](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@whoareyou](https://community.auth0.com/u/whoareyou)\
**Post date:** [March 29, 2024, 10:57pm UTC](https://community.auth0.com/t/how-do-i-configure-custom-forms-during-the-sign-up-process/130742/6 "2024-03-29T22:57:48Z")

</div>

Hmm.  
I deployed a couple of actions today, one pre-registration and one post registration and I couldn’t actually trigger them. Do actions appear in the log? For testing purposes, I deleted the user from the auth0 database. Then I went through my usual login flow that auto-creates users when using a identity provider. It created the user without issues but neither action actually triggered on the user. Note: I’m using an sdk, do the actions need to be specified there or should actions activate on every flow execution regardless of source? Note: When I ran the “Test” function on the action, it appeared on the logs.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [March 29, 2024, 11:01pm UTC](https://community.auth0.com/t/how-do-i-configure-custom-forms-during-the-sign-up-process/130742/7 "2024-03-29T23:01:57Z")

</div>

Hey @whoareyou !

Actions details should appear in logs assuming they are triggered - You do not need to do any config SDK side:

 ![Screenshot 2024-03-29 at 3.59.19 PM](https://global.discourse-cdn.com/auth0/original/3X/f/3/f36d5737d9210febb352bf0273d2d0dcf80ab083.png)

Pre and post user registration actions will only run for Database and Passwordless connections, not Social. The other thing I might check is that you have them properly attached to the flow - You can check by going to Actions → Flows → Pre/Post Registration:

 ![Screenshot 2024-03-29 at 4.01.12 PM](https://global.discourse-cdn.com/auth0/original/3X/a/e/ae69a32af81b45a1fff3692f84231dd43c851e18.png)

---

<div class="post-metadata">

**Author:** ![whoareyou](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@whoareyou](https://community.auth0.com/u/whoareyou)\
**Post date:** [March 30, 2024, 2:34am UTC](https://community.auth0.com/t/how-do-i-configure-custom-forms-during-the-sign-up-process/130742/8 "2024-03-30T02:34:51Z")

</div>

I was testing using Google, which I presume is a Social connection. So you’re saying I can’t do any custom forms during signup for any identify providers besides Auth0’s database connections? So then how can one get terms and conditions accepted upon registration?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [April 1, 2024, 10:59pm UTC](https://community.auth0.com/t/how-do-i-configure-custom-forms-during-the-sign-up-process/130742/9 "2024-04-01T22:59:58Z")

</div>

Google is indeed a social connection - Unfortunately, there are technical complexities related to capturing data in the social section of prompts. Federated connection “signups” are not processed in the same way as database connection signups; they are essentially treated like logins and therefore only Post Login Actions will run. Auth0 doesn’t control the transaction when an end-user logs in via an enterprise or social service and user data is provided to Auth0 by the enterprise/social connection upon successful authentication.

---

<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:** [April 15, 2024, 11:00pm UTC](https://community.auth0.com/t/how-do-i-configure-custom-forms-during-the-sign-up-process/130742/10 "2024-04-15T23:00:42Z")

</div>

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