question

MolokoVelocette avatar image
0 Votes"
MolokoVelocette asked MolokoVelocette commented

How to clear login_hint (user_hint)?

We have an application that performs HRD based on the users e-mail address that they enter.

Then (in some cases) it either redirects the user to ADFS WAP for authentication or another IdP.



The redirect includes the e-mail address entered by the user as login_hint/user_hint to ADFS which then automatically populates the user name field with the e-mail address.

Unfortunately this e-mail address cannot be used to authenticate using our ADFS so users are forced to clear the user name field and type in the correct user name.

Since this is very unintuitive many users dont understand they need to do this and this results in failed authentication.



Is there a way to clear the user name field from the login_hint/user_hint?



I am guessing using onload.js to NULL the value of the login_hint or username parameter would be the way to do it but how exactly?

adfs
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

piaudonn avatar image
0 Votes"
piaudonn answered MolokoVelocette commented

Hi -

I guess you could do something around those lines (not tested):

 var userNameInput = document.getElementById('userNameInput');  
 if (userNameInput)  
 {  
        // Set the username field to blank  
        userNameInput.value = '';  
 }  

But you could also use that email address as a alternate logon for the users (as long as we are not talking about Azure AD integration, else there are some caveats), as long as the email address exist in AD (and it could be stored in a customer/different attribute than the actual email address if the "real" one is different), you could use the following: https://docs.microsoft.com/en-us/windows-server/identity/ad-fs/operations/configuring-alternate-login-id.



· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you very much, Pierre!!!

0 Votes 0 ·