I am trying to log in to my private wiki using the clientlogin API from a linux-based IoT terminal which displays pages from the wiki that require authentication. I'm able to get the login token by posting "action=query&meta=tokens&type=login&format=json" to the API as specified in the API docs, but when I attempt to post "action=login&username=XX&password=XX&domain=XX&logintoken=XX&loginreturnurl=XX&format=json" to the API, the post is successful but I get [status: "FAIL", message: "The supplied credentials could not be authenticated.", messagecode: "authmanager-authn-no-primary"] in the response.
After doing some digging, it appears that this either has to do with PluggabeAuth removing the primary auth manager in $wgAuthManagerAutoConfig (as done in /includes/PluggableAuthHooks.php) or that perhaps PluggableAuth is serving as primary manager but turning down the request. When I run "action=query&meta=authmanagerinfo&amirequestsfor=login&format=json" through the API it shows that PluggableAuth has an additional field "pluggableauthlogin", which looks to be the login button, but I'm wondering if I somehow need to pass this as a parameter for the API login to work?
Any help would be greatly appreciated, as I'm running out of troubleshooting ideas here.