Disclaimer: I am confused by the model used in the ASP.NET identifier, and I say that this is my understanding of things, which may be inaccurate (I can also state obvious things, so I apologize). Also, I recently played with an Asp.Net Core identity, which is slightly different from what was available for Asp.Net 4, so I can mix things up.
Cookies
ASP.NET cookie: Cookie cookie. cookie . cookie (, FacebookAuthenticationMiddleware, ). , cookie cookie . , .
:
public class SignInManager<TUser, TKey> : IDisposable
where TUser : class, IUser<TKey>
where TKey : IEquatable<TKey>
, , IUser<TKey>. IdentityUser , , IUser<string>. , int TKey, , , .
SignInManager.SignInAsync cookie - , , - , ( asp.net MVC , 't ).
SignInManager.PasswordSignInAsync, , cookie , .
, , , - - OAuth.
Asp.Net Identity User Login, User - ... , () Login - , User . User Login s.
OAuth, - Asp.Net, ( , VS):
- ( ), (, -. , Facebook, Facebook, URL- -
FacebookAuthenticationMiddleware , Facebook). - , .
- , - Asp.Net.
- -
ChallengeResult, ( AccountController.ExternalLogin), URL- AccountController.ExternalLoginCallback, URL- URL- . ChallengeResult HTTP, -, .- - - URL-, ( Facebook it
/signin-facebook IIRC). - , , -, cookie , URL- 4 (
AccountController.ExternalLoginCallback). AccountController.ExternalLoginCallback cookie cookie . , SignInManager.ExternalSignInAsync: Login. , Cookie ; , , , , Login ( , . VS AccountController.ExternalLoginConfirmation). URL- " " 4.
Asp.Net Identity. , UserManager<TUser, TKey> , , IUserStore<TUser, TKey>, IUserRoleStore<TUser, TKey> ..