I have a table of existing users from another project. But the passwords are hashed and I can't copy them to the SF tables (different hashing and no salt).
I have a strategy (I don't like it, but it should work) where I try to log in the user through the SF provider. If it fails, I check to see if the password matches the password in the old table (after hashing). I can then change the password in SF using the following code. Changing the password works, but logging in the user doesn't work. If I try logging in a second time, it works fine since the SF tables have been updated.
It's like the user's credentials are cached or something. I tried authenticating off the reset password before changing the password to no avail. I also tried calling UserManager.GetManager().SaveChanges();
User user = UserManager.GetManager().GetUser(username);
resetPassword = user.ResetPassword();
response = SecurityManager.AuthenticateUser(UserManager.GetDefaultProviderName(), username, newPassword,
Any ideas? Thanks.