I have a project that was developed using perl-dancer and angular. The project is integrated with Google as an openID system.
On some of the pages, there is an edit grid with a save button. To prevent loss of unsaved data when the session (created from perl-dancer) expires, I implemented an angular interceptor that detects 401 server errors and opens an angular modal displaying a "Google login" button (this occurs after the session expires).
To prevent potential loss of unsaved data, the Google form opens in a new tab instead of redirecting from the original page.
Upon successful Google authentication, the new tab redirects to the project homepage while the original tab remains open with the modal displaying the "Google login" button.
Users can close the new tab, and on the original window, they can close the modal and still find their unsaved data intact.
However, this solution - necessitated by the inability to embed the Google login form or a similar solution - is not ideal for user experience.
Anyone have suggestions or solutions to improve this process?