You can get it from extension method GetExternalLoginInfo of AuthenticationManager.
var loginInfo = AuthenticationManager.GetExternalLoginInfo();
if (loginInfo != null)
{
var externalProvider = loginInfo.Login.LoginProvider;
}
Edit:
In your ApplicationSignInManager : SignInManager class override method SignInAsync
There you can externalLoginInfo and add it as a claim
public override async Task SignInAsync(User user, bool isPersistent, bool rememberBrowser)
{
var userIdentity = await CreateUserIdentityAsync(user);
//
var logininfo = AuthenticationManager.GetExternalLoginInfo();
userIdentity.AddClaim(new Claim("ExternalLoginProvider", logininfo.Login.LoginProvider));
//
AuthenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie, DefaultAuthenticationTypes.TwoFactorCookie);
if (rememberBrowser)
{
var rememberBrowserIdentity = AuthenticationManager.CreateTwoFactorRememberBrowserIdentity(ConvertIdToString(user.Id));
AuthenticationManager.SignIn(new AuthenticationProperties { IsPersistent = isPersistent }, userIdentity, rememberBrowserIdentity);
}
else
{
AuthenticationManager.SignIn(new AuthenticationProperties { IsPersistent = isPersistent }, userIdentity);
}
}
Then you can access it like this:
var identity = (ClaimsIdentity)User.Identity;
var loginProvide = identity.FindFirst("ExternalLoginProvider").Value;