Skip to content

Drupal

Back to SAML

My test configuration was successful but when I try to log in I am stuck in a redirect loop.

1,198 views Updated 2 likes

This issue generally occurs when Drupal successfully communicates with the Identity Provider (IDP), but fails to establish or maintain the authenticated user session. Common causes and solutions include:

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.

Was this helpful?

Hello there!

Need Help? We are right here!

support