Invalidating old Reset Password Links in WSO2 Identity Server

北战南征 提交于 2019-12-12 03:28:05

问题


I am following this guide to allow the users to reset the password using email. The problem is when the user requests "password reset link" for multiple times, the old links generated are not invalidated. (Password can be reset using either the latest link or old links).

Is there any parameter I can set to invalidate the old links?


回答1:


Currently, generated confirmation codes will invalidate only once user change his password successfully. So as you have mentioned user will be able to recover his password using any confirmation code he has retrieved. And when user successfully change the password, all the confirmation codes generated before that would be invalidated. This is the default behaviour for now and we don't have a configuration to change that.




回答2:


There is a property file called identity­-mgt.properties which you can find in the /repository/conf/identity/ directory. In this property file, there is a property called Notification.Expire.Time which you could use to set the confirmation code expire time in munites.

Notification.Expire.Time denotes the expiration time of the confirmation code. Even in a notification recovery scenario a confirmation code is generated. If notification is done via email, the link sent to the user for verification will include the confirmation code. Therefore, once the user clicks that link, the confirmation code will be verified. Thus, you can use this property to validate the link.



来源:https://stackoverflow.com/questions/37247607/invalidating-old-reset-password-links-in-wso2-identity-server

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