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

    lastLoginInstant is being set when a user is created through the API though the user has not logged in yet

    Scheduled Pinned Locked Moved
    Q&A
    0
    3
    516
    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.
    • J
      jlinton
      last edited by

      When we create a user through the API (api/user POST), the lastLoginInstant is being set and is the same as the lastUpdateInstant and insertInstant. Having the lastLoginInstant being set here is a bit deceiving because the user has not actually logged in yet. I notice that in the response for this API we receive a token which is not necessary for how we are utilizing the API - is the generation of this token causing the lastLoginInstant to be set?

      Is there a way that we can create a user without having any login instances being created?

      1 Reply Last reply Reply Quote 0
      • joshuaJ
        joshua
        last edited by joshua

        Hi @jlinton,

        This is working as it was designed. More context can be found here.

        https://github.com/FusionAuth/fusionauth-issues/issues/1312#issuecomment-884288287

        Is there a way that we can create a user without having any login instances being created?

        I don't believe that this is currently possible, but I can relay this feedback to the development team. A common integration pattern is to log the user in as part of sign-up, so our current implementation reflects this to provide a better user experience.

        Thanks,
        Josh

        1 Reply Last reply Reply Quote 0
        • joshuaJ
          joshua
          last edited by

          @jlinton,

          As a related note, you can elect to remove the JWT when calling the login API specifically.

          https://fusionauth.io/docs/v1/tech/tutorials/json-web-tokens/#skipping-jwt-creation

          Thanks,
          Josh

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