FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Importing users over time

    Scheduled Pinned Locked Moved Solved
    Q&A
    migration passwords hashed password hashes
    1
    3
    2.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • danD
      dan
      last edited by

      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?

      --
      FusionAuth - Identity Without Constraints
      https://fusionauth.io

      danD 1 Reply Last reply Reply Quote 0
      • danD
        dan @dan
        last edited by

        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.

        --
        FusionAuth - Identity Without Constraints
        https://fusionauth.io

        danD 1 Reply Last reply Reply Quote 0
        • danD dan has marked this topic as solved on
        • danD
          dan @dan
          last edited by

          As of 1.69.0, you can now update the password hash using the User API.

          From the documentation, the passwordFieldType is 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, and user.salt are required.
          PLAINTEXT - user.password is a plain text/unhashed value. FusionAuth will hash this value according to user.encryptionScheme and user.factor.

          --
          FusionAuth - Identity Without Constraints
          https://fusionauth.io

          1 Reply Last reply Reply Quote 0
          • First post
            Last post