Bulk user import using "scrypt algorithm" does not allow to login to Auth0 universal login

Hello everyone!

I’m using endpoint /api/v2/jobs/users-imports for importing users.

[
  {
    "email": "ilovefreethrows@nba.com",
    "name": "Shaquille O’Neal",
    "email_verified": false,
    "custom_password_hash": {
      "algorithm": "scrypt",
      "hash": {
        "value": "1e75a814d5e810dd4b4b6e4ad8bd58d09fc8ab28dbf250d74dee42146fa1310c",
        "encoding": "hex"
      },
      "salt": {
        "value": ".fGIyA/yOjE=",
        "encoding": "base64"
      },
      "keylen": 32,
      "cost": 16384
    }
  }
]

original password - qweqwe123

the password looks like this in the original db - 16384$8$1$.fGIyA/yOjE=$1e75a814d5e810dd4b4b6e4ad8bd58d09fc8ab28dbf250d74dee42146fa1310c

After API call, users are created successfully

But I cannot log in to Auth0 universal login

Could you help me sort out this scrypt hash algorithm?

I got it

salt must first be converted to base64 format:

Before:

"salt": {
  "value": ".fGIyA/yOjE=",
  "encoding": "base64"
},

After:

"salt": {
  "value": "LmZHSXlBL3lPakU9",
  "encoding": "base64"
},

1 Like

Woohooo perfect! Thanks for sharing that with the rest of community!

1 Like