I am currently working on an older web application that utilizes the portal/portlet architecture.
Within the application, I have a feature that loads in a modal when accessed. The modal includes navigation functionality that allows customers to navigate through different divs by showing and hiding them using Javascript. However, we now need to add another card to the modal that contains sensitive data, requiring customers to re-authenticate.
We are using an OpenID OAuth2 Authentication provider with a callback URL. Unfortunately, the current callback URL redirects users to the main page once authenticated, taking them out of the modal experience and potentially leading to a drop-off in engagement. Our goal is to find a way to seamlessly bring users back to where they left off within the modal after authenticating.
Are there any common strategies or patterns that could help address this issue? Perhaps passing a JavaScript method as part of the redirect URL could be a viable solution.
Although I am unable to make changes to the underlying container, I do have the freedom to incorporate additional JavaScript events and handlers to improve the user experience.