I’m trying to import users using the jobs/users-imports
endpoint. The issue is with the custom password hash.
The has data is the following:
- sha256 hash: 4796f074756c646e02da84277d68c9a9a4e954bf2d9824254a53c8059f614bb8 (hex)
- salt: tj9cH56SuUpEa076O2YeZNd59hba4kWY (raw utf8, appended in the beginning of the password)
I’m creating the following custom_password_hash
field for the user (in PHP):
[
'algorithm' => 'sha256',
'hash' => [
'value' => $hash,
'encoding' => 'hex',
'salt' => [
'value' => $salt,
'encoding' => 'utf8',
'position' => 'prefix',
],
],
]
But the import operation fails. Logs in the dashboard don’t have any details why it fails. If I remove the salt
field at all, the import succeeds but the password doesn’t work obviously because no salt is imported.
What I’m doing wrong?