Search code examples
htmlauthenticationdotnetnukecredential-manager

How to get the browser to ask to save password and auto-fill login credentials


How can I modify my custom DNN login module so that the Browser can ask to save the password and also add the information to Web Credentials?

How the module currently works is that it has a Username field with a next button. As soon as you enter the correct username it would proceed to the next step to ask you for your password.

When you navigate to the login page, the username should already be filled in.

Thanks


Solution

  • You can't. This is in the browser settings, and depending on what the user wants, and for security reasons you can't change this programmatically.

    In DNN, you have the option to check the "remember me" checkbox on the login form, this is setting a cookie which is valid for a defined time (this is done in the web.config file, search for persistantCookieTimeout and change the value. The value is in minutes as far as I remember, so to have it for 100 days ist is 60 x 24 x 100 = 144000. Default is 0, which means the cookie the login gets invalid at the end of the session.

    For further information follow these links:

    https://www.dnnsoftware.com/wiki/persistentcookietimeout

    https://www.dnnsoftware.com/community-blog/cid/134982/why-doesnt-remember-me-work-like-i-expect

    https://www.dnnsoftware.com/wiki/appsettings-in-webconfig

    https://www.dnnsoftware.com/wiki/disabling-support-for-persistent-cookies