To change the authentication request to include the openid.realm parameter , you can use the OnApplyRedirect delegate, for example.
app.UseGoogleAuthentication(new GoogleOAuth2AuthenticationOptions()
{
ClientId = "",
ClientSecret = "",
Provider = new GoogleOAuth2AuthenticationProvider
{
OnApplyRedirect = context =>
{
Dictionary<string, string> dictionary = new Dictionary<string, string>()
{
{ "openid.realm", "http://mywebsite.com/openid/realm" }
};
var redirectUri = WebUtilities.AddQueryString(context.RedirectUri, dictionary);
context.Response.Redirect(redirectUri);
},
}
});
The value openid.realmmust be the realm that you used for OpenID 2.0
google migration doc , .