Hello there,
We mainly use sub auth users for authentication in order to allow least privileges to our users.
According to the documentation, this can be used to login to the api using sub-auth-id or sub-auth-user.
You script only sets auth-id here. I have tried to change it to use sub-auth-user and it works just fine.
I will open a PR to add the possibility to use the others.