forgot-password

ASP.Net User forgot answer to password question

血红的双手。 提交于 2019-12-10 17:42:52
问题 How can I reset a password for a user who forgot both the password and the answer to the password reset question? I'm using ASP.Net membership. 回答1: Assuming your membership provider ("AspNetSqlMembershipProvider") in Web.config has requiresQuestionAndAnswer="true" , make a second provider (such as "AspNetSqlMembershipProviderAdministrativeReset") with all of the same settings except for requiresQuestionAndAnswer="false" . Then you can create an action that explicitly uses the second provider

How to generate random password, or temporary URL, for resetting password in Zend Framework?

Deadly 提交于 2019-12-09 04:13:34
问题 I have a basic authentication process that uses Zend_Auth_Adapter_DbTable . I have login and logout actions on my Authentication Controller. Now I want to create a function to reset forgotten passwords by automatically generating a password, saving the new password, and sending them an email with the newly generated password. What would be the best process to go about doing this? How should I generate a new password? Does the Zend Framework have anything that would make this easier? I have

generate password reset token in node.js

99封情书 提交于 2019-12-07 03:18:10
问题 How do I generate a password reset token in node.js that can be used in a url? I just need the method for generating the token: user.reset_password_token = ???; user.reset_password_expire = expire_date; Edit -- here's the solution: user.reset_password_token = require('crypto').randomBytes(32).toString('hex'); 回答1: I'm using this to generate my auth-token: require('crypto').randomBytes(32, function(ex, buf) { var token = buf.toString('hex'); }); Crypto Node.js v0.8.9 Manual & Documentation 回答2

Forgot password in codeigniter

纵饮孤独 提交于 2019-12-06 15:01:08
I need to implement a forgot password to a login page. First I verify email then generate a string, after that send a link with key and email to the particular mail. I know how to reset but what happened receive the link to that mail $message= "<a href='".base_url()."user/reset_pass/$key/$email'>"; This is the link I provided. First you need to check if session exist when user click on forgot password. if No,then set validation method for email which you will be taking from user. like this : $this->form_validation->set_rules('email', 'Email', 'required|valid_email|callback_email_exists'); In

How to not use ASP.Net Membership Security Question and Answer for custom password recovery?

随声附和 提交于 2019-12-06 10:04:49
问题 I don't want to have the security question and answer feature that ASP.Net Membership Provider gives, but I DO want to enable a lost/forgotten password page. This page would be where a user would enter his/her email address and an email would be sent to that address if the user was registered for them to reset their password via a link sent to that registered email address I've created the custom table to track such requests, the random key assigned to the request as well as an expiry date on

ASP.NET Identity: use GeneratePasswordResetToken on Azure website

白昼怎懂夜的黑 提交于 2019-12-06 04:11:00
问题 I have my web application deployed on Microsoft Azure. However when I want to generate a PasswordResetToken with: var token = await _userManager.GeneratePasswordResetTokenAsync(user.Id); I get the following error: System.Security.Cryptography.CryptographicException: The data protection operation was unsuccessful. This may have been caused by not having the user profile loaded for the current thread's user context, which may be the case when the thread is impersonating. How do I get this to

generate password reset token in node.js

旧时模样 提交于 2019-12-05 06:08:00
How do I generate a password reset token in node.js that can be used in a url? I just need the method for generating the token: user.reset_password_token = ???; user.reset_password_expire = expire_date; Edit -- here's the solution: user.reset_password_token = require('crypto').randomBytes(32).toString('hex'); I'm using this to generate my auth-token: require('crypto').randomBytes(32, function(ex, buf) { var token = buf.toString('hex'); }); Crypto Node.js v0.8.9 Manual & Documentation function customToken() { var buffreValue = new Buffer(64); for (var i = 0; i < buffreValue.length; i++) {

How to not use ASP.Net Membership Security Question and Answer for custom password recovery?

牧云@^-^@ 提交于 2019-12-04 17:32:09
I don't want to have the security question and answer feature that ASP.Net Membership Provider gives, but I DO want to enable a lost/forgotten password page. This page would be where a user would enter his/her email address and an email would be sent to that address if the user was registered for them to reset their password via a link sent to that registered email address I've created the custom table to track such requests, the random key assigned to the request as well as an expiry date on the request. However in writing the code to actually reset the password, I realised that there doesn't

Why should we make account activation/password reset links expire after some time?

自古美人都是妖i 提交于 2019-12-04 04:41:43
Would there be any big issues if they never expire? Somebody forgot his password and requests to reset his password, an email with the password reset link is sent to him. He then suddenly remembers his password and so he simply ignores the password reset email. But after a few days, he forgot again. Since he already has a password reset email in his mailbox, he simply clicks on that link to go back to the website to reset his password. This seems ok, so why should we make account activation/password reset links expire after some time? What if their email account was compromised. The attacker

Password reset by emailing temporary passwords

泪湿孤枕 提交于 2019-12-03 10:19:45
问题 A group in my company is implementing a single-sign-on REST API for our applications. This authentication service has a password reset function. The application sends the username to the reset function. If that username is associated with an email address, then an email is sent to that address with a temporary password. The other approach seems to be sites which email a secure, temporary link which presents a page for the user to input a new password. This page only exists for a short period