cancel
Showing results for 
Search instead for 
Did you mean: 

How to prevent user from clicking the "Sign In" button more than once?

Highlighted
Contributor

How to prevent user from clicking the "Sign In" button more than once?

As each time user click "Sign In" button, it will initiate an Authentication Request.

I want to disable the "Sign In" button after user clicks it once.

6 REPLIES 6
Highlighted
Regular Contributor

Re: How to prevent user from clicking the "Sign In" button more than once?

You can add some pre-processing with custom sign-in pages by changing the onsubmit="return Login(<% setcookies %>)" in LoginPage.thtml to point to your own script and then call the original Login(<% setcookies %>) from your script only once you are ready to pass the login credentials to the box.

Your script could be something like this:

var sNameOfUsernameText = "username";

var sNameOfADPasswordText = "password";

var sNameOfOTPPasswordText = "password#2";

function MyLogin(setCookies) {

/* If all fields entered attempt Sign In */    

if (!document.getElementById(sNameOfUsernameText).value == "" && !document.getElementById(sNameOfADPasswordText).value == "" && !document.getElementById(sNameOfOTPPasswordText).value == "") {

     Login(setCookies);

     return true;

} else {

      CheckInput();

      return false;  }

}

function CheckInput() {

//* Error checking goes here */

}

Highlighted
Super Contributor

Re: How to prevent user from clicking the "Sign In" button more than once?

This is not possible, you can enable a pre auth sign in notification advising users to click on the button once as a workaround.

Regards,

Jay

Highlighted
Contributor

Re: How to prevent user from clicking the "Sign In" button more than once?



dcvers wrote:




You can add some pre-processing with custom sign-in pages by changing the onsubmit="return Login(<% setcookies %>)" in LoginPage.thtml to point to your own script and then call the original Login(<% setcookies %>) from your script only once you are ready to pass the login credentials to the box.

Your script could be something like this:

var sNameOfUsernameText = "username";

var sNameOfADPasswordText = "password";

var sNameOfOTPPasswordText = "password#2";

function MyLogin(setCookies) {

/* If all fields entered attempt Sign In */    

if (!document.getElementById(sNameOfUsernameText).value == "" && !document.getElementById(sNameOfADPasswordText).value == "" && !document.getElementById(sNameOfOTPPasswordText).value == "") {

     Login(setCookies);

     return true;

} else {

      CheckInput();

      return false;  }

}

function CheckInput() {

//* Error checking goes here */

}






has anyone tried out this solution and whether it works?

I cant seem to get this login page workable

Highlighted
Contributor

Re: How to prevent user from clicking the "Sign In" button more than once?

Is it possible to perform this function using Custom Sign In page?
Implication is that if user clicks 4 times instead of once(to validate 1st AD, then OTP), it will lead to first time user is able to login, but subsequent request, Invalid OTP. It also leads to redundant authentication wasting time by Radius Server, where it only needs to authenticates the first authentication request only.

Since the custom sign in page uses javascript, is there any way I can put javascript in the custom sign in page?

Please add this feature to the next version if it is not added.


Highlighted
New Contributor

Re: How to prevent user from clicking the "Sign In" button more than once?

Hello,

the best way to acheive this by adding a fonction in the custom login pages on the onsubmit

For instance , when taking the loginpage.thtml

We have :



This becomes :



at the top of the page you add the following fonction check F


function checkF()
{
frmLogin.btnSubmit.disabled = true;
return true;
}


Jurgen schouppe
Highlighted
New Contributor

Re: How to prevent user from clicking the "Sign In" button more than once?

Before :

[code][/code]

Becomes :

[code][/code]