Using onExecutePostUserRegistration , is possible to get globalClientId?

Hi community

I am testing (onExecutePostUserRegistration) of “flow” actions, but i am using static data for the client id.

my question: is it possible to get the “global client id” inside this “action”?

my code is like this:

const options = {
method: “POST”,
url: “https://x.auth0.com/dbconnections/change_password”,
headers: { “content-type”: “application/json” },
data: {
client_id:“STATIC-CLIENT-ID”,
email:userEmail,
connection:“Username-Password-Authentication”,
},
};

I would like something like this: {{application.clientId}} <3

Greetings !

Hi @freddymhs,

Why are you wanting to use the global client ID for this? Do you mean the client ID of the application the user has registered with?

I understand that it should not be linked to the user’s profile, the “client ID” is the environment of auth0 , eg: “local” , “production”.

image

The purpose of the client ID for this endpoint is so that the email template knows from which client the request was triggered. Why not use event.client.client_id? This would ensure the user gets an email that is relevant to the application they are authenticating with.

Otherwise you might want to chose to omit the client ID entirely. I’m not sure what a global client ID would do, and if I’m missing something please let me know.