Skip to content

Conversation

@Kelsey-Ethyca
Copy link
Contributor

@Kelsey-Ethyca Kelsey-Ethyca commented Nov 17, 2025

Ticket ENG-1466

Description Of Changes

Fixed an issue where the SSO login button was not visible after an idle timeout. Previously, when users returned to the login page after their session expired, the SSO providers query would not refetch, causing the SSO button to be missing until a manual page refresh.

This change adds refetch options to the authentication methods and SSO providers queries on the login page. The queries will now automatically refetch when:

  • The component mounts (refetchOnMountOrArgChange)

This ensures that users returning to the login page after a timeout will see the SSO button immediately without needing to manually refresh the page.

Code Changes

  • Added refetch options to useGetAuthenticationMethodsQuery hook in clients/admin-ui/src/pages/login.tsx
  • Added refetch options to useGetAllOpenIDProvidersSimpleQuery hook in clients/admin-ui/src/pages/login.tsx
  • Both queries now include refetchOnMountOrArgChange: true

Steps to Confirm

  1. Set up an SSO provider (e.g., Azure) via the API to enable SSO
  2. Log in to Fides using the SSO button
  3. Wait for session timeout or manually clear browser localStorage/sessionStorage to simulate a timeout
  4. Verify you are taken back to the login page (/login)
  5. Verify that the SSO button appears automatically without requiring a manual page refresh
  6. Verify that both username/password fields (if enabled) and SSO button are visible on the login page

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Add a db-migration This indicates that a change includes a database migration label to the entry if your change includes a DB migration
    • Add a high-risk This issue suggests changes that have a high-probability of breaking existing code label to the entry if your change includes a high-risk change (i.e. potential for performance impact or unexpected regression) that should be flagged
    • Updates unreleased work already in Changelog, no new entry necessary
  • UX feedback:
    • All UX related changes have been reviewed by a designer
    • No UX review needed
  • Followup issues:
    • Followup issues created
    • No followup issues
  • Database migrations:
    • Ensure that your downrev is up to date with the latest revision on main
    • Ensure that your downgrade() migration is correct and works
      • If a downgrade migration is not possible for this change, please call this out in the PR description!
    • No migrations
  • Documentation:
    • Documentation complete, PR opened in fidesdocs
    • Documentation issue created in fidesdocs
    • If there are any new client scopes created as part of the pull request, remember to update public-facing documentation that references our scope registry
    • No documentation updates required

@vercel
Copy link

vercel bot commented Nov 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
fides-plus-nightly Ready Ready Preview Comment Nov 18, 2025 7:38pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
fides-privacy-center Ignored Ignored Nov 18, 2025 7:38pm

@Kelsey-Ethyca Kelsey-Ethyca marked this pull request as ready for review November 17, 2025 22:38
@Kelsey-Ethyca Kelsey-Ethyca requested a review from a team as a code owner November 17, 2025 22:38
@Kelsey-Ethyca Kelsey-Ethyca requested review from gilluminate and removed request for a team November 17, 2025 22:38
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 17, 2025

Greptile Summary

  • Adds RTK Query refetch options (refetchOnMountOrArgChange, refetchOnFocus, refetchOnReconnect) to authentication methods and SSO provider queries
  • Fixes SSO login button visibility issue after idle session timeout by ensuring queries automatically refetch when users return to login page

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is minimal, well-scoped, and uses standard RTK Query refetch options that are already used elsewhere in the codebase. The refetch options are appropriate for the login page use case and won't cause performance issues since the queries only execute on the login page
  • No files require special attention

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile
React with 👍 or 👎 to share your feedback on this new summary format

@Kelsey-Ethyca Kelsey-Ethyca changed the title refetch login page on timeout Fix SSO login button not appearing after session timeout without manual refresh Nov 17, 2025
@gilluminate
Copy link
Contributor

Have you tested this with just the refetchOnMountOrArgChange set to true? This feels a bit overly aggressive. This is specifically about returning to the login page (re-mounting the component), not about tabbing away and back to an already-mounted login page or network reconnection while sitting on the login page.

@Kelsey-Ethyca
Copy link
Contributor Author

Have you tested this with just the refetchOnMountOrArgChange set to true? This feels a bit overly aggressive. This is specifically about returning to the login page (re-mounting the component), not about tabbing away and back to an already-mounted login page or network reconnection while sitting on the login page.

@gilluminate you are right those refetches were not necessary. I have tested with just refetchOnMountOrArgChange and it works. Updated the PR and ready for re-review.

@Kelsey-Ethyca Kelsey-Ethyca added this pull request to the merge queue Nov 18, 2025
Merged via the queue into main with commit f7c0838 Nov 18, 2025
47 checks passed
@Kelsey-Ethyca Kelsey-Ethyca deleted the ENG-1466-oidc-button-not-visible-after-idle-timeout branch November 18, 2025 20:22
jjdaurora pushed a commit that referenced this pull request Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants