Log Social Logins in Custom DB

We have a custom DB connection for our user/password signups in our DB. Our DB also has users who signed up using Google Sign On.

I understand that Social Sign On through auth0 does not go through Custom DB action scripts - however I want to get the existing user from my DB if they have signed up before using Google Sign On. Likewise, if a new user is signing up using Google Sign On, I also want to log this into our DB to maintain that relationship - all users exist in my database, social and user/pass.

I believe I can use a rule or action - what would be the appropriate action to use? Pre-Registration? Post-Registration? I’d need this to by synchronous