I\'m trying to use the new MVC5 framework in VS 2013 preview.
The membership authentication framework has been overhauled and replaced with OWin.
So unfortunately this is not super straightforward, one way you can do this is to hook the GoogleProvider Authenticated event and add a custom claim to the Claims Identity with the avatar:
public class MyGoogleProvider : GoogleAuthenticationProvider {
public override Task Authenticated(GoogleAuthenticatedContext context) {
context.Identity.AddClaim(new Claim("avatarClaim", ""));
return base.Authenticated(context);
}
}
app.UseGoogleAuthentication(new GoogleAuthenticationOptions() { Provider = new MyGoogleProvider() });
Then inside of your AccountController, when the external identity is extracted, you can take this avatar claim and store it into your user object for use later.