Skip to main content
jvdc
Expert ⭐️
Aug 6, 2025 8:01 PM UTC
Solved

Login page: switch order of SSO and local login

Hey,

in our community we offer 2 login methods: 

  • local login
  • SSO for staff who have registered their account with professional email

since SSO login is only for a small portion of our members, I was wondering if there was any easy way to switch the order in which these 2 options show up. Right now it’s SSO first then local login.

I would like local login first and then SSO.

any idea?

 

olimarrio
olimarrioAnswer
Gainsight Employee ⭐️
Aug 7, 2025 12:50 PM UTC

Hey ​@jvdc 👋,

This would need some custom code. Here’s a solution using JavaScript:

<script>
document.addEventListener("DOMContentLoaded", function () {
if (window.location.href === "URL TO YOUR PRIVATE LOGIN PAGE") {
const boxContent = document.querySelector('.box__content');
const modalLogin = document.getElementById('modal_login');

if (boxContent && modalLogin) {
boxContent.appendChild(modalLogin);
}
}
});
</script>

Let me know if it works!

2 replies

olimarrio
Gainsight Employee ⭐️
olimarrioAnswer
Gainsight Employee ⭐️
Aug 7, 2025 12:50 PM UTC

Hey ​@jvdc 👋,

This would need some custom code. Here’s a solution using JavaScript:

<script>
document.addEventListener("DOMContentLoaded", function () {
if (window.location.href === "URL TO YOUR PRIVATE LOGIN PAGE") {
const boxContent = document.querySelector('.box__content');
const modalLogin = document.getElementById('modal_login');

if (boxContent && modalLogin) {
boxContent.appendChild(modalLogin);
}
}
});
</script>

Let me know if it works!

Translate
jvdc
jvdcAuthor
Expert ⭐️
Aug 7, 2025 1:40 PM UTC

Thanks ​@olimarrio , works like a charm!

Translate