Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • ggesheva 15 posts 116 karma points
    Jun 19, 2020 @ 10:30
    ggesheva
    0

    CustomMembershipProvider.ValidateUser()

    Hello!

    After setting up a CustomMembershipProvider I need to validate the member before logging. The problem I am facing is that my password is a simple text which is used as an input from the user while the member.Password is the hashed password.

        public override bool ValidateUser(string username, string password)
        {
            var member = _membersRepository.GetMemberByUsername(username);
    
            if (member != null)
            {
                return member.Password == password;
            }
    
            return false;
        }
    

    How can I solve this problem so the passwords are properly compared?

Please Sign in or register to post replies

Write your reply to:

Draft