Skip to content

Commit 01e6fc6

Browse files
committed
updates
1 parent 166e6d3 commit 01e6fc6

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

  • content/en/docs/marketplace/platform-supported-content/modules/SAML

content/en/docs/marketplace/platform-supported-content/modules/SAML/_index.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -532,11 +532,24 @@ Page URLs and Microflow URLs are supported with SAML for Mendix version 10.6 and
532532

533533
1. To use the Page URL functionality, replace the content of *login.html* with the content of *login-with-mendixsso-automatically.html* (located in the **resources** > **mendixsso** > **templates** folder) without changing the file name.
534534
2. To implement the SSO redirection, replace the code in the `<script>` tag your login page (for example, *login.html*) with the following code:
535+
535536
* For automatic redirection: use `window.onload` to automatically redirect users to the SSO login page.
536-
`const returnURL = encodeURIComponent(window.location.search+window.location.hash);`
537-
`self.location = '/SSO/login?cont='+returnURL;`
537+
538+
```javascript
539+
window.onload = function () {
540+
const returnURL = encodeURIComponent(window.location.search + window.location.hash);
541+
location.replace('/SSO/login?cont=' + returnURL);
542+
};
543+
```
544+
538545
* For manual redirection: add an onclick event to the button that manually triggers the SSO login.
539-
`window.location.href='/SSO/login?cont=' + encodeURIComponent(window.location.search + window.location.hash);`
546+
547+
```javascript
548+
function SSOlogin() {
549+
const returnURL = encodeURIComponent(window.location.search + window.location.hash);
550+
location.replace('/SSO/login?cont=' + returnURL);
551+
}
552+
```
540553

541554
Once the above changes are applied, end users can directly navigate to the desired page. If not logged in, they will be redirected to the IdP login page for authentication. After successful log in, they will be directed to the desired page using page and microflow URLs.
542555

0 commit comments

Comments
 (0)