I am using developer edition and created two apps accessing the same web map in AGOL under the same user. The web map is not public. So I set up a proxy with the username/password of the user who own the web map. This proxy would work for both apps to access the same web map. Continuously accessing one of the two app is perfectly fine. No sign in required. The strange thing is when I open the other app after already opened the first, it always pop up this annoying sign in windows asking "Please sign in to continue". Refreshing the page will make it go away. But if I open the first app the pop up appear again.
I think this is what happened. When I first open app1, the proxy make a request and get a token from AGOL. App1 will then be able to make further request to AGOL using this token which is perfectly fine. However when I open app2, for some reason, the proxy still try to make request using the same token but it didn't work, thus the popup sign in window. And when I refresh app2, somehow the proxy realized it should get a new token, and then it did and then everything is fine. When you want to open app1 again, same problem happen again.
I am not sure where to fix this problem. It seems like a proxy problem but I am not sure. If anyone can help me out it would be greatly appreciated.