Skip to content

Commit 07425d4

Browse files
committed
Improve text around code snippets.
1 parent d94b2cc commit 07425d4

File tree

1 file changed

+13
-3
lines changed
  • content/en/docs/appstore/use-content/platform-supported-content/modules

1 file changed

+13
-3
lines changed

content/en/docs/appstore/use-content/platform-supported-content/modules/oidc.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -916,10 +916,20 @@ You can disable this setting by navigating to **Security > Anonymous users** and
916916

917917
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) and save it as `login.html`.
918918

919-
2. To implement the SSO redirection, replace the code in the `<script>` tag of your login page (for example, `login.html`) with one of the following pieces of code, depending on whether you want automatic or manual redirection:
919+
2. To implement the SSO redirection, you will need to replace the code in the `<script>` tag of your login page (for example, `login.html`) with code which does one of the following, depending on whether you want automatic or manual redirection:
920920

921-
* For automatic redirection, use `window.onload` to automatically redirect users to the SSO login page. `const returnURL = encodeURIComponent(window.location.search+window.location.hash);` `self.location = '/oauth/v2/login?cont='+returnURL;`
922-
* For manual redirection: add an onclick event to the button that manually triggers the SSO login. `window.location.href='/oauth/v2/login?cont=' + encodeURIComponent(window.location.search + window.location.hash);`
921+
* For automatic redirection, you can use `window.onload` to automatically redirect users to the SSO login page. You could, for example, use the following code:
922+
923+
```javascript
924+
const returnURL = encodeURIComponent(window.location.search+window.location.hash);
925+
self.location = '/oauth/v2/login?cont='+returnURL;
926+
```
927+
928+
* For manual redirection, you can add an onclick event to a button that manually triggers the SSO login. For example:
929+
930+
```javascript
931+
window.location.href='/oauth/v2/login?cont=' + encodeURIComponent(window.location.search + window.location.hash);
932+
```
923933

924934
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.
925935

0 commit comments

Comments
 (0)