Actions Triggers: pre-user-registration - API Object

The API object for the pre-user-registration Actions trigger includes:

api.access

Modify the access of the user that is logging in, such as rejecting the registration attempt.

api.access.deny(reason, userMessage)

Deny the user from being able to register. The signup flow will immediately stop following the completion of this action and no further Actions will be executed.

Returns a reference to the api object.

Parameter Description
reason

String. An internal reason describing why this registration attempt is being denied. This value will appear in tenant logs.

userMessage

String. A human-readable explanation for rejecting the registration attempt. This may be presented directly in end-user interfaces.

api.user

Make changes to the metadata of the user that is registering.

api.user.setUserMetdata(name, value)

Set metadata for the user that is registering. Data stored within user_metadata is visible and editable by the user.

Returns a reference to the api object.

Parameter Description
name

String. The name of metadata property.

value

Any value. The value of the metadata property. This may be set to `null` to remove the metadata property.

api.user.setAppMetadata(name, value)

Set application metadata for the user that is registering. Data stored within app_metadata is not visible or editable by the user.

Returns a reference to the api object.

Parameter Description
name

String. The name of metadata property.

value

Any value. The value of the metadata property. This may be set to `null` to remove the metadata property.