Auto credentials strange issue

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
hpl123
Posts: 2594
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Auto credentials strange issue

Post by hpl123 »

Hi all,
I have various forms where users log in to Aware IM applications (custom forms) and on these forms, the user USED TO be able to log in, have the browser e.g Chrome save the credentials (on first login) and then next time the user visits the same login page/form, the browser automatically "autotypes" the credentials so the user only need to press the "Sign in" button. This has changed recently and is a strange thing as it has only changed on my Aware IM forms and not on other forms e.g the forum and various other sites making me think this may be some configuration thing in the forms I am using i.e something I can fix. Currently, the user has to put their mouse/cursor in the username field and there the username pops up as an dropdown choice (only choice i.e the problem is not that there are multiple users/credentials saved for that one form) and when they select it, the username and password fields are filled in and the user can then press the "Sign in" button to login. Again, for other forms/sites like the Aware IM forum the credentials ARE autotyped in and the user/I only have to press "Login".

Anyone else experiencing this and have any thoughts on how to fix it? Thanks
Henrik (V8 Developer Ed. - Windows)
hpl123
Posts: 2594
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Auto credentials strange issue

Post by hpl123 »

Aaarrgh, crappy issue this. Can anyone confirm they still have working autotype for any form used with Aware i.e the credentials are autotyped in (after first saving them in the browser and not using any external password manager) and the user only have to press "Login". to login to the app (i.e the user does not have to put their mouse/cursor in the username field and there the username pops up as an dropdown choice and when they select it, the username and password fields are filled in and the user can then press the "Login" button to login).
Henrik (V8 Developer Ed. - Windows)
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Auto credentials strange issue

Post by Jaymer »

In the past year, I have not seen an aware login form, either the default one or ones that I have customized, do what you say.
I always use chrome, and the only thing that happens is if you click on it a list of pre-saved field choices will be available.

Having said that, the only site that I regularly use that does this does this: https://mail.ionos.com/
For me, it takes about a second for it to pop up my user ID and password.
But it doesn’t do that on aware.
Yahoo does, but not the big grocery chain Publix.com

So, stuffing critical that I ever worried about in a nowhere page. I think I’ve always had to at least click on the field to activate the password managers history.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
hpl123
Posts: 2594
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Auto credentials strange issue

Post by hpl123 »

I always use custom login forms and it has always worked like this for me i.e the credentials are autotyped into the form etc.. During the last couple of months, this changed and now I always have to choose an dropdown option to get the browser to populate the credentials even if it´s only 1 choice. Not a big deal, just cumbersome and is most noticable on mobile where the user before this could open app and just click login instead of doing this, that and the other (pun intended :) )
Henrik (V8 Developer Ed. - Windows)
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Auto credentials strange issue

Post by Jaymer »

When you say mobile, do you mean native mobile, or just a browser on the phone?
I think you need mean native mobile.
I just ran my app on my android and it pre-populated my name and password, So all I have to do is click login.
There’s some JavaScript that checks local storage to populate that I believe.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
hpl123
Posts: 2594
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Auto credentials strange issue

Post by hpl123 »

I mean through browser and is the same mechanism native/non native I believe as the native is using the phone browser behind the scenes. Thanks for confirming it works, then I know it can be done and I just need to figure out how.
Henrik (V8 Developer Ed. - Windows)
Jaymer
Posts: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Auto credentials strange issue

Post by Jaymer »

native mobile login page has this code:

Code: Select all

	setTimeout (function () {
		if (localStorageDisabled === false)
		{
			try
			{
				var user = localStorage.getItem ("AwareIMUser");
				var pwd  = localStorage.getItem ("AwareIMPassword");
				if (user && pwd)
				{
					$("#userName").val (user);
					$("#password").val (pwd);
				}
			}

In index.html under tomcat, this is all thats there:

Code: Select all

<script>
    var elem = document.getElementById ("name");
    if (! elem.placeholder)
    {
		document.getElementById ("domain").style.display = "block";
		document.getElementById ("name").style.display = "block";
		document.getElementById ("pass").style.display  = "block";
		document.forms[0].style.height = "370px";
		document.forms[0].style.marginTop = "-220px";
    }
    
    var errorDiv = document.getElementById ("errorMsg");
    if (errorDiv)
    {
    	var errorMsg = "";
    	for (var i = 0; i < errorDiv.childNodes.length; ++ i)
    	{
    		errorMsg += errorDiv.childNodes [i].nodeValue;
    	}
    	
    	if (errorMsg.length > 0)
    	{
	    	document.getElementById ("domain").style.borderColor = "#f00";
	    	document.getElementById ("name").style.borderColor = "#f00";
	    	document.getElementById ("pass").style.borderColor = "#f00";
	    	
	    	alert (errorMsg);
    	}
    }

</script>
doesn't do anything like mobile.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
hpl123
Posts: 2594
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Auto credentials strange issue

Post by hpl123 »

I don´t think this is the thing. If I remember correctly, because of security concerns all major browsers have restricted code based manipulations of autofill etc. features due to the risk of a JS script capturing passwords and doing stuff with them etc.. Not sure though and will tinker some and look at this and other things to see if I can fix it. Not a big deal but is a PITA.
Henrik (V8 Developer Ed. - Windows)
Post Reply