public async Task<ActionResult> OAuthTokenCallback()
{
var ctx = GetOAuthContextCookie();
var ip = GetEnabledOAuthIdentityProviders().Single(x => x.ID == ctx.IdP);
var oauth2 = new OAuth2Client(GetProviderTypeFromOAuthProfileTypes(ip.ProviderType.Value), ip.ClientID, ip.ClientSecret);
var result = await oauth2.ProcessCallbackAsync();
if (result.Error != null) return View("Error");
var claims = result.Claims.ToList();
claims.Add(new Claim(Constants.Claims.IdentityProvider, ip.Name, ClaimValueTypes.String, Constants.InternalIssuer));
var id = new ClaimsIdentity(claims, "OAuth");
var cp = new ClaimsPrincipal(id);
return ProcessOAuthResponse(cp, ctx);
}