Importing users over time
-
I have a large number of users. I want to import them into FusionAuth with their password hashes and the accompanying data like the factor.
But my cutover is going to be slow, so I expect some percentage of people to change their password hashes after the import.
So I'd like synchronize any password hashes that changed in the meantime, and then roll out FusionAuth.
I can't re-import password hashes for an existing user, and the User API doesn't let me update passwords hashes, per this closed issue: https://github.com/FusionAuth/fusionauth-issues/issues/348
What would you recommend?
-
I think the way I'd approach this is:
- import all users into FusionAuth
At cutover time:
- look at local database to see which password hashes had changed
- pull the user data from FusionAuth for each of these users
- delete the user
- re-import the user with the new password hash and the FusionAuth data, maintaining the same userId (if you provide the UUID, we'll use that)
I get that is an additional complexity, but hopefully that helps.
-
D dan has marked this topic as solved on
-
As of 1.69.0, you can now update the password hash using the User API.
From the documentation, the
passwordFieldTypeis the API field to use. This field:Describes what user.password in the request is. The possible values are:
HASHED- user.password is an already hashed value. When this value is supplied,user.encryptionScheme,user.factor,user.password, anduser.saltare required.
PLAINTEXT- user.password is a plain text/unhashed value. FusionAuth will hash this value according touser.encryptionSchemeanduser.factor.