We have developed a redline tool in WAB for a client that creates objects in feature classes through a feature service. It all works great, until we put it on the client machine where we have proxy set up with AGOL to do the authentication. I've tracked down in F12 tools that the offending line of javascript is creating a function to handle the promise returned from a portal object's 'load' function, so that we can get a list of the groups the user has access to (see below).
Without using the proxy for the WAB app, it works perfectly and flows through the .then functions as expected - but the users are forced to log in a second time when the open the app from AGOL. If I configure the proxy to handle this app, the app itself will load and run fine (maps display, etc), but when the widget is opened, a generic javascript syntax error with no indication of source line is thrown. The error occurs when stepping through when the on(aPortal, load... is executed.