Issue integrating QuickBooks Online as a social connection

We have implemneted our own SSO via Auth0 using a database provider. All of our users currently use this database provider. We now need to add the ability for our users to authenticate via Qucikbooks Online (in addition to via username-password). There is a social connection for QBO that we would like to use however we are finding that when one of our database users try to use the QBO social connection they are taken to QBO to authenticate a new Auth0 user is created with the {connection: “quickbooks-online”} metadata but there is no action that is fired (post-registration, post-login) for us to do anything like merging the QBO user to an existing user. The QBO user authentication then fails with an error in Auth0 because that user is not associated to any organization.

We have added a post authentication action that can detect if we have any other Auth0 user with the same email and merge those users with the multiple providers (database, QBO). Then the user can use either database or QBO providers to authenticate from then on. But it would not be an acceptable UX to make them login twice the first time like that.

This seems like it would be a pretty common use case. Is there any documentation that explains how to handle this via Auth0? Why are the (post-registration, post-login) actions not firing after the first authentication via social connection?

Thanks in advance for any help.

1 Like

Hi @andrew.hyte

Welcome to the Auth0 Community!

Thank you for posting your question! To address your questions, while post-registration action is by design meant to be triggered only by the Database or Passwordless connection, post-login action should be triggered by the social connection.. The proposed scenario is commonly solved by account linking. You can read more on how to do it here → https://auth0.com/docs/manage-users/user-accounts/user-account-linking/link-user-accounts. In the Action Template Library, there’s already a boilerplate for the account linking that you can use.

Thanks
Dawid