How to Authenticate User from Docker Containers with TrueNAS SCALE Users?

I am currently working on a project that involves user authentication from a Docker (running inside the TrueNAS) container to the user accounts on TrueNAS SCALE. My goal is to have authenticate the users inside the Dockerized application against the existing TrueNAS SCALE users, rather than maintaining a separate authentication system inside the container.

Best security practices when allowing a container to authenticate users from the host system (TrueNAS)?

I would really appreciate any guidance, tutorials, or documentation that could point me in the right direction.