I’m confused and concerned with the following line because it seems like the API for the OAuthWebSecurity has its own authentication store.
// If the current user is logged in add the new account
OAuthWebSecurity.CreateOrUpdateAccount(result.Provider, result.ProviderUserId, User.Identity.Name);
If I’m reading the above correctly, it seems to indicate that the API saves relationship locally.
Please tell me this is not the case, and explain what exactly does it do? I need my web application to be as stateless as possible, I cannot have API storing local values like this.
It uses the
SimpleMembershipProviderwhich is the default provider in ASP.NET MVC 4 to create or update the association between the public provider user id and a local user. Basically it will add a record to thewebpages_OAuthMembershiptable.Here’s the corresponding code from the
WebSecurity.CreateOrUpdateOAuthAccountthat gets called: