diff --git a/modules/authX509/lib/Auth/Source/X509userCert.php b/modules/authX509/lib/Auth/Source/X509userCert.php
index 3ddd7e411a041aa43199403ed2200b6d106480a0..e7e73dc912801e33088af22cc7afae5ebc8904a8 100644
--- a/modules/authX509/lib/Auth/Source/X509userCert.php
+++ b/modules/authX509/lib/Auth/Source/X509userCert.php
@@ -97,13 +97,10 @@ class sspmod_authX509_Auth_Source_X509userCert extends SimpleSAML_Auth_Source {
 	 * @param array &$state  Information about the current authentication.
 	 */
 	public function authFailed(&$state) {
-		$id = SimpleSAML_Auth_State::saveState($state, self::STAGEID);
-		$params = array('AuthState' => $id);
 		$config = SimpleSAML_Configuration::getInstance();
 
 		$t = new SimpleSAML_XHTML_Template($config,
 			'authX509:X509error.php');
-		$t->data['stateparams'] = $params;
 		$t->data['errorcode'] = $state['authX509.error'];
 
 		$t->show();