FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login
    1. Home
    2. Tags
    3. uuid
    Log in to post
    • All categories
    • danD

      Use specified ids for all entities to make sure that environments are the same

      Q&A
      • ids environments uuid • • dan
      2
      0
      Votes
      2
      Posts
      1.7k
      Views

      danD

      If you'd like the form fields and other entities to all have the same ids across environments, you can do that.

      The default form fields ship with random ids, as you mention. Some FusionAuth entities that always have the same ids, but if you want to control everything, the easiest way to do so is to create all the entities yourself.

      You have two options:

      Kickstart, a declarative format that runs only when a FusionAuth is first initialized. More details here: https://fusionauth.io/docs/v1/tech/installation-guide/kickstart/ Using the API, typically via one of the client libraries: https://fusionauth.io/docs/v1/tech/client-libraries/

      With Kickstart, you can create all the form fields, forms and other entities. You'd hard code the UUIDs for each entity. For example, you could hardcode a form field's UUID like so (an excerpt from a kickstart file):

      { "method": "POST", "url": "/api/form/field/85a03867-dccf-4882-adde-1a79aeec50df", "body": { "field": { "description": "The user's first name", "key": "user.firstName", "name": "Custom first-name Form Field", "required": true } } },

      You would build up forms out of these fields with known ids, then assign forms to the applications/tenants and so on.

      If you use Kickstart, the default entities with the random ids will still be added, but can be ignored. Currently you can't run a DELETE operation in Kickstart, but you can either delete the default entities later via an API call. If being able to call a DELETE operation in a Kickstart file is important, please consider filing an issue.

      You could do much the same with APIs in python, ruby, java, or any of the other supported languages as well. All entities take an id on creation. With these libraries, you'd also be able to delete the default form and other elements. The benefit of using the API is that you aren't limited by Kickstart, but there's more code to write.

      You can also use Kickstart to set up your environment initially and then use the API/client libraries for changes over time.

    • danD

      Solved What version of UUID is used for auto-generation of user ids?

      Q&A
      • uuid user ids • • dan
      2
      0
      Votes
      2
      Posts
      713
      Views

      danD

      UUID v4

      More details about datatypes in general: https://fusionauth.io/docs/v1/tech/reference/data-types

    • danD

      Unsolved I'm seeing a "cannot deserialize value of type ‘java.util.uuid’ from string" error when posting to /api/login

      Q&A
      • uuid login-api • • dan
      2
      0
      Votes
      2
      Posts
      6.8k
      Views

      danD

      It looks like the uuid isn't being sent as a string. Per https://fusionauth.io/docs/v1/tech/reference/data-types#uuids it should be quoted.

      So you want to send:

      { "applicationId": "15e45e7d-3e34-43df-9366-91c66a8cc9ae", "loginId": "myuserid", "password": "mypassword" }