I have a strange situation with the standard print widget that comes with webappbuilder 10.9.0. When it create the webmap as json, the op layer is missing the token. Digging into the code, the reason for that is because
The layer display and loads fine. Isloaded == true. So my question is any idea why credential would be missing?
Secondly any easy way to set credential ONLY for secured service or do I have to test if it is shared to everyone prior to setting the credential?
The workaround for you is: add an application proxy and proxy rules for the secured layers in WAB application.