I have recently started implementing OAuth in an ASP.Net MVC 4 project.
I have written a custom membership provider. All methods are complete in this ExtendedMembershipProvider.
When trying to use the default MVC 4 Account Controller login callback all works fine. The problem I do have is the line that calls:
OAuthWebSecurity.Login(result.Provider, result.ProviderUserId, createPersistentCookie: false))
The above throws a NotImplementedException. This seems weird seeing I know that all my membership methods are complete.
The stack trace shows anything before this code as “external” so i am wondering where the issue lies?
I have a feeling that this is caused by not using a user profile provider. The OAuthWebSecurity methods all seem to attempt to talk to the Profile provider as this is where OAuth information is stored.
I’ve written my own repository methods to avoid using the OAuthWebSecurity classes, and instead just used the ‘result’ to pull the info back from DotNetOAuth manually.