So I am in the process of implementing a Facebook login via MVC 4 simplemembership oAuth provider.
Registering and signing in the user has worked well. However after signing in a user using oAth, I am unable to get the UserId of the authenticated user. I can see that the UserId exists in the membership_oauth table and it relates to the UserId in the UserProfile table.
Normally I would fetch it using WebSecurity.CurrentUserId but there does not seem to be a method for getting this when using OAuthWebSecurity. When I try, WebSecurity.CurrentUserId I get "an instance of the object has not been instantiated", error.
Does anybody know how to get this information?
Much appreciated!