Skip to content

Preserve Query and Batch Edit state across SSO session expiration#7831

Draft
acwhite211 wants to merge 2 commits intomainfrom
issue-7817
Draft

Preserve Query and Batch Edit state across SSO session expiration#7831
acwhite211 wants to merge 2 commits intomainfrom
issue-7817

Conversation

@acwhite211
Copy link
Member

@acwhite211 acwhite211 commented Mar 19, 2026

Fixes #7817

This fixes a session expiration gap for SSO users where Specify could lose work, that's in progress, after the identity provider required re-authentication.

When an SSO session expires, we'll have Specify do that following:

  • Preserve the original destination through the OIDC login/callback flow.
  • Save Query Builder state, that are in progress, before redirecting to login.
  • Save Batch Edit changes, that are in progress, before redirecting to login.
  • Restore the user to the same page with their prior state after re-authentication.

This addresses the reported behavior where users could lose progress in queries or batch edits after inactivity, and improves the timeout flow so it's handled as a recoverable re-authentication path, instead of dropping users back into a reset application state.

Checklist

  • Self-review the PR after opening it to make sure the changes look good and
    self-explanatory (or properly documented)
  • Add relevant issue to release milestone
  • Add pr to documentation list
  • Add automated tests
  • Add a reverse migration if a migration is present in the PR

Testing instructions

Query Builder

  • Log into Specify 7 using an SSO provider.
  • Open a query or navigate to a record set and run a query.
  • Make in-memory changes that are not saved to the query definition.
  • Leave the app idle long enough for the SSO authorization token to expire.
  • Return to the page and click Refresh or otherwise trigger a request.
  • Verify Specify sends the user through re-authentication instead of losing context.
  • Complete login with the SSO provider.
  • Verify the user returns to the same query page.
  • Verify the query state is restored, including unsaved field/filter configuration.

Batch Edit

  • Log into Specify 7 using an SSO provider.
  • Open a record set and launch Batch Edit.
  • Make unsaved edits in the Batch Edit grid.
  • Leave the app idle long enough for the SSO authorization token to expire.
  • Return to the page and click Refresh or otherwise trigger a request.
  • Verify Specify sends the user through re-authentication instead of dropping them into a reset state.
  • Complete login with the SSO provider.Verify the user returns to the same Batch Edit dataset.
  • Verify unsaved cell edits are restored.

@acwhite211
Copy link
Member Author

Was looking into maybe a simpler solution with having a dialog box on the front-end that was triggered when the session was close to expiring. The dialog box would warn the user to save their data before the session expired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📋Back Log

Development

Successfully merging this pull request may close these issues.

Preserve state and prevent crash during SSO token renewal

1 participant