I have used facebook to allow users to log into a site. The page that manages the login will get the users facebook id and then look on the ASP.NET membership tables for a pre-existing user that has a matching ID.
No match: a new user is created and logged in (no problem).
A match: I want to log the user on. The problem is that I have the hashed password and I cannot use MembershipService.ValidateUser(logOn.UserName, logOn.Password) to log the user on.
If I just use FormsAuthentication.SetAuthCookie, the user doesn't appear as logged in.
I could set enablePasswordRetrieval to true in the web config and then just get the actual password, but I don't want to. I want this to be secure.
Does anyone know a way to log a user onto ASP.NET Membership just using the user name? I have looked at the MembershipProvider class for alternative methods but I cant find any.
Thanks,
Oliver