Store social connections in the custom database

1. How can I force any user to be stored in the database on the Auth0 side by using rules/hooks? I don’t want to modify the Account Linkin extension to keep it managed and updated.
All user profiles are stored in Auth0, the only difference is when using an external IdP, the profile would be updated from the external source on a new login, and Auth0 will have no hash of the password.

2. How can I create an auto-increment integer field in user data stored in the Auth0 database?
This would either be sent when creating a new Database user via the Management API, or be stored as app_metadata alongside the auto-generated user_id.
For the latter case, a pre-user registration triggered action could be used to set this, but auto-incrementing would not be possible with Actions alone as they do not support caching - they have no persistence with other previous runs of Actions.
But you could make a call to your backend to fetch what should be the new ID perhaps.

1 Like