Auto-fill created_by field

That’s because there are two different authentication plugins

  • strapi-plugin-users-permissions => This is for end users, aka users using REST/GraphQL
  • strapi-admin => This is for the administration panel

The latter option is automatically handled for you if the content is created while in the admin panel, for the former I’d suggest using lifecycle callbacks or policies to set the author field (policies would be best as you can intercept the request before the controller is ran, using the ctx.state.user.id would allow you to set an author field)

You won’t have one field that can do both (technically you could using polymorphic relations, but their support is quite limited right now and I wouldn’t suggest it).