title: SSOCircle keeps redirecting to Consent page SAML2.0
body: <p>I am using SSOCircle to test out my SAML implementation with Codeigniter. The current steps are:</p>
  
  <ol>
  <li>Access website.com</li>
  <li>Redirected to SSOCircle Consent Page</li>
  <li>Verify identity</li>
  <li>Pass user data back to website.com</li>
  </ol>
  
  <p>However, after step 3, it goes to step 4 and back to step 3 immediately. </p>
  
  <p>This is my code:</p>
  
  <pre><code>public function index()
      {
          $data['languages']= get_all_languages();
          $sp_auth = 'default-sp';
          try {
              $auth = new SimpleSAML_Auth_Simple($sp_auth);
              $auth-&gt;requireAuth(array(
              'ReturnTo' =&gt; $this-&gt;data['controller'],
              'KeepPost' =&gt; FALSE,
              ));
              $attributes = $auth-&gt;getAttributes();
              var_dump($attributes);
          } catch (Error $e) {
              print_r($e);
          }
      }
  </code></pre>
  
  <p>I have considered that my redirect may be the reason it keeps calling the consent page. However when added another url for it to access with this function</p>
  
  <pre><code>public function auth(){
          $attributes = $auth-&gt;getAttributes();
          var_dump($attributes);
  }
  </code></pre>
  
  <p>I get this error: </p>
  
  <pre><code>SimpleSAML_Error_Error: UNHANDLEDEXCEPTION
  
  Backtrace:
  1 www/_include.php:45 (SimpleSAML_exception_handler)
  0 [builtin] (N/A)
  Caused by: SimpleSAML_Error_Exception: No authentication source with id 'Login/Auth' found.
  Backtrace:
  2 lib/SimpleSAML/Auth/Source.php:335 (SimpleSAML_Auth_Source::getById)
  1 modules/saml/www/sp/saml2-acs.php:12 (require)
  0 www/module.php:135 (N/A)
  </code></pre>
  
  <h2>Update</h2>
  
  <p>I recently noticed that SSOCircle actually returns back to my login page. However, it immediately redirects it back to the SSOCircle page. Not sure if this helps</p>
  
  <p>NULL
  Redirect
  You were redirected to: <a href="https://idp.ssocircle.com:443/sso/SSORedirect/metaAlias/publicidp?SAMLRequest=vVPBjtowEP2VyPfghCQqWIDELqoWabeLCO1hLytjD4ulxHY9k6X8fZ2kVbc9cOzJ0vO8N%2B%2FN2AuUbePFuqOz3cP3DpCSH21jUQwXS9YFK5xEg8LKFlCQEvX66VFMJ5nwwZFTrmEfKLcZEhECGWdZst0s2WtWgNafINe5UlrqY1lJmE1BlvOimkN10mVWZZDn85wl3yBgZC5ZFIp0xA62FklailCWz9KsSPP8kM1EVYqqeGHJJqYxVtLAOhN5FJwb7SeITpmgGpgo14qyLHhEeF0%2F70GbAIp4CyTXjZHIfXdsjIoslqx%2Fu793FrsWQg3h3Sj4un%2F8o6%2FhfRJdBe0UpjgWYN%2BH7x%2FuniCoLly59D6KDs44nU3Qr14GunI0rW%2BgnyO%2FXC68dbqLJv3Z8wHD8ZymUuGAajjJrqEUo7vdr23cGauNfbu9iONYhOLhcNilu%2Bf6wFaLXlsMgw2r%2FxSnn7OWJP9Js%2BAfvSzGR%2Folpthudi62uiafXWgl3Q7ZI0anp6FUUJAWDViKi2wad7kPIAmWjEIHjK%2FGln9%2FhdVP&amp;RelayState=https%3A%2F%2Fwww.website.com%2Fapp" rel="nofollow noreferrer">https://idp.ssocircle.com:443/sso/SSORedirect/metaAlias/publicidp?SAMLRequest=vVPBjtowEP2VyPfghCQqWIDELqoWabeLCO1hLytjD4ulxHY9k6X8fZ2kVbc9cOzJ0vO8N%2B%2FN2AuUbePFuqOz3cP3DpCSH21jUQwXS9YFK5xEg8LKFlCQEvX66VFMJ5nwwZFTrmEfKLcZEhECGWdZst0s2WtWgNafINe5UlrqY1lJmE1BlvOimkN10mVWZZDn85wl3yBgZC5ZFIp0xA62FklailCWz9KsSPP8kM1EVYqqeGHJJqYxVtLAOhN5FJwb7SeITpmgGpgo14qyLHhEeF0%2F70GbAIp4CyTXjZHIfXdsjIoslqx%2Fu793FrsWQg3h3Sj4un%2F8o6%2FhfRJdBe0UpjgWYN%2BH7x%2FuniCoLly59D6KDs44nU3Qr14GunI0rW%2BgnyO%2FXC68dbqLJv3Z8wHD8ZymUuGAajjJrqEUo7vdr23cGauNfbu9iONYhOLhcNilu%2Bf6wFaLXlsMgw2r%2FxSnn7OWJP9Js%2BAfvSzGR%2Folpthudi62uiafXWgl3Q7ZI0anp6FUUJAWDViKi2wad7kPIAmWjEIHjK%2FGln9%2FhdVP&amp;RelayState=https%3A%2F%2Fwww.website.com%2Fapp</a></p>
  
  <h2>Update 2</h2>
  
  <p>I just checked the logs and I have received this warning</p>
  
  <pre><code>Mar 12 23:26:26 simplesamlphp WARNING [da20d4a7a3] Could not load state specified by InResponseTo: NOSTATE Processing response as unsolicited.
  </code></pre>
  
  <p>I was told that this is because of lost state information. However I have checked my cookie names and they match up. What else have I missed? </p>
  
  <p><a href="https://github.com/simplesamlphp/simplesamlphp/wiki/State-Information-Lost" rel="nofollow noreferrer">https://github.com/simplesamlphp/simplesamlphp/wiki/State-Information-Lost</a></p>