ASP.NET Identity : Generate random password

前端 未结 6 1164
天涯浪人
天涯浪人 2021-02-02 10:50

Is there any built in function that creates random passwords ? Asp.net simple memebership used to have a similar method

6条回答
  •  孤城傲影
    2021-02-02 11:53

    ASP.NET Identity does not have a generate password method.

    I'm not sure of your exact use case, but I believe the preferred approach would be to send the user a reset password link that allows the user to enter their own password. This is generally considered more secure than sending out a generated password in plain text.

    See the Reset Password section in this tutorial: http://www.asp.net/identity/overview/features-api/account-confirmation-and-password-recovery-with-aspnet-identity

提交回复
热议问题