Pre User Registration flow action with social signup

I have setup an action for pre user registration flow to setup the user first on our end so we can return back an id to store on auith0’s side. This works great when registering a user with email and password. However, when I register using google or linkedin etc this action is not called. Any idea / suggestion for a work around this?

Appreciate any help on this, thanks!

Hi @bmanza,

Welcome to the Auth0 Community!

For Social Connection users, I recommend using a Post-login action to add your custom logic.

For example:

exports.onExecutePostLogin = async (event, api) => {
  if (event.stats.logins_count === 1 && event.connection.strategy  === event.connection.name){
  //Your logic here  
}
};

Reference doc: Actions Triggers: post-login - Event Object

Does that help?

Thanks,
Rueben

1 Like

thanks @rueben.tiow! Appreciate the reply, this will work for us

1 Like

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