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

    lastLoginInstant data lost during upgrade from 1.57.0 to 1.59.1

    Scheduled Pinned Locked Moved Unsolved
    Q&A
    2
    2
    201
    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.
    • F
      florent.bossuyt
      last edited by

      Hi,

      During the migration of our instance from version 1.57.0 to version 1.59.1, we lost the lastLoginInstant data for almost all of our users.
      After checking the database, we found that this data had been set to null in the user table.

      Is there a known bug logged regarding this issue?
      Is there a procedure available to restore or reconcile the data?

      We have since upgraded to version 1.62.2. The data updates for users who log in again, but it remains missing for users who have not logged in.

      Thank you in advance for your feedback.

      danD 1 Reply Last reply Reply Quote 0
      • danD dan moved this topic from Q&A
      • danD dan moved this topic from Frequently Asked Questions (FAQ)
      • danD
        dan @florent.bossuyt
        last edited by

        Hiya @florent-bossuyt ,

        Thanks for using FusionAuth.

        The upgrade to 1.59.0 added support for phone number as a first class identity. While I don't know for sure, it is possible that impacted lastLoginInstant. I'm not aware of any bug filed.

        It's also possible you can find the data previously in the lastLoginInstant in the user.identities[x].lastLoginInstant value, available when you retrieve a user.

        Since this is not a known issue, there's no documented procedure for reconciling the data, unfortunately.

        Here's one approach, though.

        If you have a database backup of the 1.57.0 release, you could stand up a FusionAuth instance pointing to that, and find all the users with a lastLoginInstant that is not null (set A). You'd then run the same query against your prod instance (set B). Then find the folks in set A who are not in set B (call them set C). Set C are the people you need to update.

        Unfortunately, you can't update their lastLoginInstant directly. But you can fake a login using the passwordless APIs, which should set it. That is outlined here.

        So you'd want to perform that for all the users in set C.

        Hope that helps.

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

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