Now I understand your point, your question (sorry the delay, hahaha).
But the answer to get if the request are using the master key on login for examples you just use the triggers that Parse has: Cloud Code Guide | Parse
Parse.Cloud.beforeLogin(async (req) => {
const { master } = req
console.log('master', master)
})
About this error: the endpoint to login is “/login”, POST request. Works fine on my tests here, even using master key.