diff --git a/lib/SimpleSAML/Auth/Simple.php b/lib/SimpleSAML/Auth/Simple.php index e6b2f13f77d227cb0dea37b0273d261a05623105..b45d07bede101295f9ada9c775edc4538934f42b 100644 --- a/lib/SimpleSAML/Auth/Simple.php +++ b/lib/SimpleSAML/Auth/Simple.php @@ -111,13 +111,14 @@ class SimpleSAML_Auth_Simple { } - /* - * An URL to restart the authentication, in case the user bookmarks - * something, e.g. the discovery service page. - */ - $restartURL = $this->getLoginURL($returnTo); - - $params[SimpleSAML_Auth_State::RESTART] = $restartURL; + if (!isset($params[SimpleSAML_Auth_State::RESTART])) { + /* + * An URL to restart the authentication, in case the user bookmarks + * something, e.g. the discovery service page. + */ + $restartURL = $this->getLoginURL($returnTo); + $params[SimpleSAML_Auth_State::RESTART] = $restartURL; + } SimpleSAML_Auth_Default::initLogin($this->authSource, $returnTo, $errorURL, $params); assert('FALSE');