informatics-isi-edu / chaise

An adaptive user interface for the Deriva platform.
https://www.isi.edu/isr/
Apache License 2.0
9 stars 6 forks source link

Login popup is not going away after user logs in #2262

Closed RFSH closed 1 year ago

RFSH commented 1 year ago

This bug is only reproducible in deployments that require login in all apps. To reproduce this:

In this special scenario, Chaise will try to allow users to continue without refreshing the page. But since we couldn't reproduce it, we didn't fully implement it, and the code path abruptly ends without refreshing the page or hiding the popup.

Should we even attempt to continue with the page? or should we not bother and refresh like all the other scenarios?

jrchudy commented 1 year ago

This error was happening because the 401 handler we were attaching in ermrestJS wasn't being called properly. We were not passing a callback function to popupLogin() that would check whether the modal process succeeded or was canceled and would decide to call the appropriate callback functions originally supplied to modalLogin().