Make sure password is a 4 digit PIN code.
Relies on the changes added to Koha in this bug: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22706.
This will hopefully be included in Koha 19.11. (Fingers crossed!)
Magnus Enger <magnus@libriotech.no>