We recently upgraded our enterprise from 10.9 to 10.9.1 and I'm not sure if this is related but now all of my server deployed WAB Apps are stuck in a login loop (anything accessed through the portal is totally fine). I initially thought this might be due to using older version of WAB to build them so I updated my WAB to 2.21 (i tried 2.22 but had issues with the install). However, any new Apps I create in 2.21 now request an additional login for the web map item. I have recreated and reregistered the WAB developer application on my portal but this doesn't help.
This will fix any new WAB dev applications but how do i resolve the endless login loop affecting our current WAB applications on our server? These were all created with a mix of v2.15-v2.18 builds.
As I wrote here in another reply, I have the same problem (JS API 4.18 on WAB app on enterprise 10.9.1 enters endless login loop).
As you wrote that you addressed ESRI tech support - is there a solution that you can tell me about?
Upgrading the apps to v2.21 resolved the login loop for me. We previously didnt have to have the app ID in the application config but apparently now you do. That resolved the extra login issue i was also having.
Indeed setting "appId" in config to the portal's application id, solved the problem fo JS API 4.18. For higher js API versions, "appId" can remain empty.
I did it using WAB Developer Edition version 2.22 to create my web app, while changing in env.js to use the JS API version 4.18
Only pay attention - When WAB version 2.22 creates the zip, in empties the config "appId" !!
You must "refill" it again after unziping !!
We still use JS Api 4.18, since in newer versions, SAML login is not working in Web AppBuilder Developer Edition v2.20 and above after deploying the application on IIS. (This has been reported as Bug Number: BUG-000142159).