1. Caching enabled: Disable Drupal page caching temporarily and exclude SSO login and callback URLs from caching. Clear Drupal caches and check CDN or Varnish caching.
2. HTTP/HTTPS mismatch: Ensure Drupal and the IDP use consistent HTTPS URLs. Enforce HTTPS on the website and verify reverse proxy settings if applicable.
3. Cookie or session issues: Check whether Drupal session cookies are created and sent after successful authentication. Verify cookie domain, Secure, and SameSite settings.
4. Conflicting modules: Other Drupal modules, particularly security, cookie-management, session-management, or authentication modules, may interfere with SSO. Temporarily disable suspected modules to identify conflicts.
5. Reverse proxy configuration: If Drupal is behind a load balancer or reverse proxy, ensure it correctly detects the original HTTPS protocol and trusted forwarding headers.
Troubleshooting tip: Open your browser’s Developer Tools → Network tab, enable Preserve log, and attempt login. Check the redirect sequence and session cookies to identify where the loop starts.