There is React application with a form. Application has a 15mins session handled by a separate service. The separate service allows on extending the session after 10mins (within 5mins window).
Extending the session is done by a browser redirect to the service endpoint, then user is being redirected back to the React application. User is starting those operations after a popup appeared on the screen (being a React component) and user clicks a button.
There is no way to extend the session by AJAX request, browser redirect has to be done.
Problem
After getting back to the React application, there is no data in the form, which was opened and filled in (but not submitted yet)
Question
What could be a concept of the solution solving such problem? Which React mechanisms could be used, to allow on collecting the form data to send it to backend, then to retrieve it and to finally fill in the form again. Data can be sensitive. It should handle any form presented on any SPA route. Session popup can appear any time at any page of the application. Only currently opened form has to be saved.
Frontend technology
React, Formik