Skip to content

Commit 0b869d3

Browse files
committed
Allow set desired target on saml_sso endpoint by the use of a 'target' GET parameter
1 parent 64034cc commit 0b869d3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

onelogin-saml-sso/php/functions.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ function saml_sso() {
144144
wp_redirect(home_url());
145145
exit();
146146
}
147-
if (isset($_SERVER['REQUEST_URI']) && !isset($_GET['saml_sso'])) {
147+
148+
if (isset($_GET["target"])) {
149+
$auth->login($_GET["target"]);
150+
} else if (isset($_SERVER['REQUEST_URI']) && !isset($_GET['saml_sso'])) {
148151
$auth->login($_SERVER['REQUEST_URI']);
149152
} else {
150153
$auth->login();

0 commit comments

Comments
 (0)