I made an app in ExpB Dev Edition 1.18 that includes the Analysis widget. I pointed the widget to a custom GP tool hosted on my ArcGIS Server 11.5 that's a slightly modified Zip Clip and Ship tool for data extraction.
On localhost, the app works great and everything works as it should. After I deployed it to my test server, when I run that GP tool, it runs successfully, but when I click the output result, it prompts me to sign into ArcGIS Online (see screenshot: when I click the box highlighted in red is when I get prompted to sign in). If I click Cancel, I can proceed to the tool result and get my download, but I have no idea WHY it's prompting for an AGOL login when nothing about the tool requires it. The web map that the app uses is shared to Public, the GP tool is fully public, and the web server is also now fully public. I used an OAuth 2.0 app credential for the app, and gave it access to the web map.
I noticed this call in Dev Tools from the test web server:
https://MY-ORG.arcgis.com/sharing/rest/content/users/null?f=json&num=1
Compared to the same request from localhost, which seems to be appending a token:
https://MY-ORG.arcgis.com/sharing/rest/content/users/cba70c03a34a8ce4750407b89d9073c1?f=json&num=1&token=asnc7i7ZShdjjPzyb5PWvFA..mxSrq9YnOU-5qUcSIQnrDu5PbqSTDEJH5BMrxJHH9VnkAfcANp2Qyk5THNs86g-zYIuCRigKMJMPXQBMFvhQhdfEZU8UdjDyz-9wxjAvPbXi7HumTY_n70PpbWGG9ZVSTGoeUIaCrpotAFTz3vLnj9BHxS7IA0346mqhHyTNWaJ9CV957J7atEBkGdMW8QoT70tXMqs5BMY-zVTtmsmbVuHut_fcHGPOXOvqUUD_CWTEAiBYToYHSxjw6_qnqE4r2tRem0wcbdrua9OvHQWV7Yj2
Does this mean the public app can't generate a token to use for the widget? I tried using AI to troubleshoot and it said that the GP tool output folder may require a token to get to the output data, and the app may be reaching out to AGOL to try and get a token because that's where I've got the ClientID generated from, as opposed to an Enterprise Portal. But I still don't understand why the GP tool would require a token to access it.
Any ideas why I'm seeing this behavior, and how I can remove it? The app is intended to be for the public, and so is the tool, so I don't want sign-in boxes popping up when people are using the app.