Value in my custom base field added to user entity isn't saved I've created a new custom basefield for user entity type like this:
function hd_is_integration_entity_base_field_info_alter(&amp;$fields, \Drupal\Core\Entity\EntityTypeInterface $entity_type) {
  if ($entity_type-&gt;id() === 'user') {
    $fields['is_uid'] = BaseFieldDefinition::create('text')
      -&gt;setName('is_uid')
      -&gt;setLabel(t('IS User ID'))
      -&gt;setDescription(t('ID of this user in HD IS.'))
      -&gt;setSettings([
        'max_length' =&gt; 50,
        'text_processing' =&gt; 0,
      ])
      -&gt;setDefaultValue('')
      -&gt;setDisplayOptions('view', [
        'label' =&gt; 'above',
        'type' =&gt; 'string',
        'weight' =&gt; 0,
      ])
      -&gt;setDisplayOptions('form', [
        'type' =&gt; 'string_textfield',
        'weight' =&gt; 0,
      ])
      -&gt;setDisplayConfigurable('form', TRUE)
      -&gt;setDisplayConfigurable('view', TRUE);
  }
}

I've also updated the entity schema with update hook:
function hd_is_integration_update_8001(&amp;$sandbox) {
  $field_storage_definition = BaseFieldDefinition::create('string')
    -&gt;setName('is_uid')
    -&gt;setLabel(t('IS User ID'))
    -&gt;setDescription(t('ID of this user in HD IS.'))
    -&gt;setSettings([
      'max_length' =&gt; 50,
      'text_processing' =&gt; 0,
    ])
    -&gt;setDefaultValue('')
    -&gt;setDisplayOptions('view', [
      'label' =&gt; 'above',
      'type' =&gt; 'string',
      'weight' =&gt; 0,
    ])
    -&gt;setDisplayOptions('form', [
      'type' =&gt; 'string_textfield',
      'weight' =&gt; 0,
    ])
    -&gt;setDisplayConfigurable('form', TRUE)
    -&gt;setDisplayConfigurable('view', TRUE);

  \Drupal::entityDefinitionUpdateManager()
    -&gt;installFieldStorageDefinition('is_uid', 'user', 'user', $field_storage_definition);
}

The field is displaying fine in the user edit form, but any value added in it isn't saved. What am I missing, please?
In the end, I mofified my approach using https://www.drupal.org/project/one_time_password as an example. The difference is probably in the installation of the field definition - hook_install() works just fine.