Actions not triggered with social login

Problem statement

We are using Social/Enterprise connections and want to trigger actions in the Pre User Registration / Post User Registration flows, but they are not triggering.

Cause

As mentioned in the trigger documentation, these will only run for Database or Passwordless connection types.

Solution

Unfortunately, Pre User Registration and Post User Registration actions can only be used in conjunction with Database and Passwordless type connections, they will not be triggered for Social or Enterprise connections.

“The post-user-registration triggers runs after a user has been created for a Database or Passwordless connection.”:

Instead, you would need to implement this logic in a Post User Registration flow - you could use the “event.stats.logins_count” combined with the “event.connection.name” for example to see if this is the user signing in for the first time with a social connection and trigger your custom code.

You could also use a custom app_metadata field to track whether an email has been sent to a social connection user if you needed to carry this out retrospectively.

1 Like