title: Drupal 7 + SimpleSaml SSO After Login redirects to "Demo Example" page
body: <p>We have setup SimpleSaml with Drupal 7 as an IP to allow users to login to a 3rd party service using their Drupal credentials. Everything seems to be working up to the point where the user is entering their credentials on the Drupal login page however, once they login, they are redirected to the SimpleSaml "Demo Example" page. (module.php/core/authenticate.php)</p>
  
  <p>All their details are correct and they are clearly authenticated but the redirect back to the 3rd party site never happens.
  We have checked, the 3rd party is sending the correct (encoded) data including the AssertionConsumerServiceURL.</p>
  
  <p>The question is to figure out how to make Drupal to redirect back to the 3rd party url.</p>
  
  <p>Libraries used:</p>
  
  <pre><code>simpleSAMLphp version 1.11.0
  drupalauth for SimpleSAMLphp 1.7+ and Drupal 7.x
  drupalauth4ssp (which comes with the drupalauth module)
  </code></pre>
  
  <p>Config:</p>
  
  <pre><code>SimpleSaml 2
  store.type: sql
  auth as: drupal-userpass
  Apache is configured correctly
  We are on Centos 
  We have SSL offload implemented on our test environment which seems to be working ok
  (Load balancer 443 offloads to Apache 80)
  </code></pre>
  
  <p>Content of authsources.php:</p>
  
  <pre><code>$config = array(
  
  // This is a authentication source which handles admin authentication.
  'admin' =&gt; array(
      // The default is to use core:AdminPassword, but it can be replaced with
      // any authentication source.
      'core:AdminPassword',
  ),
  'drupal-userpass' =&gt; array(
          'drupalauth:External',
  
          // The filesystem path of the Drupal directory.
          'drupalroot' =&gt; '/var/www/html/',
  
      // Whether to turn on debug
          'debug' =&gt; TRUE,
  
          // the URL of the Drupal logout page
          'drupal_logout_url' =&gt; 'https://[drupal_domain]/user/logout',
  
          // the URL of the Drupal login page
          'drupal_login_url' =&gt; 'https://[drupal_domain]/user',
  
          // Which attributes should be retrieved from the Drupal site.
  
             'attributes' =&gt; array(
                 array('drupaluservar' =&gt; 'uid',  'callit' =&gt; 'uid'),
                 array('drupaluservar' =&gt; 'name', 'callit' =&gt; 'cn'),
                 array('drupaluservar' =&gt; 'mail', 'callit' =&gt; 'mail'),
                 array('drupaluservar' =&gt; 'field_user_firstname',  'callit' =&gt; 'givenName'),
                 array('drupaluservar' =&gt; 'field_user_lastname',   'callit' =&gt; 'sn'),
                 array('drupaluservar' =&gt; 'roles','callit' =&gt; 'roles'),
             ),
  ),
  
  );
  </code></pre>
  
  <p>I am happy to post more info if required.</p>