User object empty on Post Registration Flow

Hi!

I have played around with Actions and Flows a bit and was trying to implement a Post Registration Flow as follows:

  • I send an organization invitation email to the user
  • the user clicks the link and registers

I was expecting that the event.user object includes all necessary user data but unfortunately the object only contains the email address. Why is that? This makes the Post Registration Flow pretty useless.

Hi @Poolshark,

The post-user registration action trigger is designed to notify another system that a user has registered for your application. Use this type of action to execute asynchronous tasks such as adding a user ID to an external system or sending a Slack notification.

More info.

In this case, you can use a post-login action with a conditional to determine whether or not to send the invite/is a first login.

Hi @dan.woda,

I have read, the docs but I do not understand why we do not have access to the entire user data including app_metadata and user_metadata? If I understand this right, at Post Register the user is already stored in the database - including all necessary information. In my particular case I would like to add OR update the user in an external database, depending on the app_metadata which I generate at the organisation invitation.

However, I have solved this with a Pre Registration action, which adds a hasRegistered flag to the user’s app_metadata. Then I have 2 Post Login actions - one for a signup where the user has to be added to the external database and one where the user gets updated in the external database. The Actions get fired if:

  • hasRegistered = true in app_metadata → user gets added
  • hasRegistered && isCreated in app_metadata → user gets updated

In both Post Login Actions I unset the values hasRegisterd and isCreated which lets the user login normally once the registration is done.

1 Like

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