This was a failed attempt. It does not work because SameSite=None isn't set on the cookie.
This is a proof of concept just to show how much effort you have to put in to use commons query service auth client side. This is hacky, and may not work in all browsers, in private browsing mode, if you have adblockers, or for a variety of other reasons.
Checking if you are logged in
You are not logged in. You need to first login to the Commons Query service using your Wikimedia user account.
. If you have never used Wikimedia Commons query service before, you must first login to the service at least once.
. Once you have done that, close the window and come back here.
Trying to login again.
Done!
Error logging in. This probably means third party cookies are being blocked. Reload page to try again.