How to extend AspNetUserLogin in ASP.Net Identity?

When a user logs in with an external login provider like facebook or twitter , I want to store it ExternalIdentity.Name

in the database so that it can be displayed on the user details page.

What I have now:

[AllowAnonymous]
public ActionResult ExternalLoginCallback(string returnUrl)
{
    var loginInfo = AuthenticationManager.GetExternalLoginInfo();
    if (loginInfo == null)
        return RedirectToAction("Details", new { message = "LinkLoginError" });

    // Sign in the user with this external login provider if the user already has a login
    var result = SignInManager.ExternalSignIn(loginInfo, isPersistent: false);
    ...
}

      

How can I extend / change / override the method SignInManager.ExternalSignIn

to save the table loginInfo.ExternalIdentity.Name

to dbo.AspNetUserLogins

?

+3
c # asp.net asp.net-identity


source to share


No one has answered this question yet

Check out similar questions:

3575
How to list an enumeration?
1817
How to customize Microsoft JSON date?
1071
JavaScriptSerializer - JSON serialization of an enum as a string
355
ASP.NET Id - HttpContext has no extension method for GetOwinContext
135
What are the requirements in ASP.NET Identity
2
ASP.NET MVC5 Identity linking local accounts to external accounts (social requirements) during user registration
1
Facebook Login to no longer allow Url URL parameters?
0
ASP.NET MVC 5 External login doesn't work in Live, but works in localhost
0
ASP Identity New user with externallogin
0
FBOAuth Implementation in Asp.Net MVC Application



All Articles
Loading...
X
Show
Funny
Dev
Pics