Disable browser 'Save Password' functionality

前端 未结 30 3337
失恋的感觉
失恋的感觉 2020-11-21 23:29

One of the joys of working for a government healthcare agency is having to deal with all of the paranoia around dealing with PHI (Protected Health Information). Don\'t get m

30条回答
  •  你的背包
    2020-11-21 23:43

    Facing the same HIPAA issue and found a relatively easy solution,

    1. Create a hidden password field with the field name as an array.

      
      
    2. Use the same array for the actual password field.

      
      

    The browser (Chrome) may prompt you to "Save password" but regardless if the user selects save, the next time they login the password will auto-populate the hidden password field, the zero slot in the array, leaving the 1st slot blank.

    I tried defining the array, such as "password[part2]" but it still remembered. I think it throws it off if it's an unindexed array because it has no choice but to drop it in the first spot.

    Then you use your programming language of choice to access the array, PHP for example,

    echo $_POST['password'][1];
    

提交回复
热议问题