remove saved old password from browser after password change

假装没事ソ 提交于 2019-12-11 10:50:12

问题


I'm implementing a password change feature in my web application. The old password is already saved by the browser for auto login . How can I replace it with the new password when the user login next time? I use jsp and dojo in the view part. With servlets and spring framework.


回答1:


This is handled by the actual browser, you don't have access to that sort of thing with Javascript. Most browsers that store your password will also ask you to update your password if you ever successfully login with a password other than what they have stored.




回答2:


I'm assuming that you've used a cookie to store their login details, so that you can automatically log them in the next time they visit your web application. As part of your password change functionality, you'll want to either remove the cookie (forcing them to login again next time they visit, using their new details - this login should then create the cookie for future visits) or modify the cookie to store the updated login details (so that they continue to be logged into your web application automatically).



来源:https://stackoverflow.com/questions/6203364/remove-saved-old-password-from-browser-after-password-change

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!