user_id hash on Custom DB

I am moving my users on-premises and was wondering which type of hashing auth0 is using when running on the local DB?

I don’t quite understand your question - what do you mean by when running on the local DB? The Auth0 user_id is simply an internal identifier that consists of a connection name and a unique identifier for the user.

By local DB i mean running the DB inside auth0 and not CustomDB. The ID are hashed on auth0 while on my own database its a simple PK starting from 1…x. I would like to re-create the same hashing behaviour on my PK.

To retain the id from your custom db, you can return that id in the user profile in your custom db scripts, e.g:

 callback(null,   {
        user_id:      user.id // user.id is the PK in my custom db
      });

To retain the id from your custom db, you can return that id in the user profile in your custom db scripts, e.g:

 callback(null,   {
        user_id:      user.id // user.id is the PK in my custom db
      });

Thanks. But this does not explain which type of hashing auth0 is using? I want to implement the same hash function on my CustomDB…