Hi Everyone!
According to the documentation (https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-Portal.html#authMode), when Portal.authMode is set to anonymous, an error will be returned when a secure resource is requested. However, during my testing, even when setting Portal.authMode to anonymous, a login window still appears, prompting the user to enter their credentials. This behavior is indistinguishable from the auto mode (The user will be signed in when a secure resource is requested.).
I would like to know if this is an API bug or if I am using it incorrectly. I have created a demo to replicate this issue, which adds a service that requires authentication. You can find the demo here: https://codepen.io/xiej/pen/VwozrRr?editors=1000.
Any help is greatly appreciated! Thank you for your assistance!