Update Google and Microsoft Account Handler exception message
This commit is contained in:
parent
0d216d726a
commit
0e855b25a8
|
|
@ -34,7 +34,7 @@ namespace Microsoft.AspNetCore.Authentication.Google
|
||||||
var response = await Backchannel.SendAsync(request, Context.RequestAborted);
|
var response = await Backchannel.SendAsync(request, Context.RequestAborted);
|
||||||
if (!response.IsSuccessStatusCode)
|
if (!response.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
throw new HttpRequestException($"An error occurred when retrieving user information ({response.StatusCode}). Please check if the authentication information is correct and the corresponding Google API is enabled.");
|
throw new HttpRequestException($"An error occurred when retrieving user information ({response.StatusCode}). Please check if the authentication information is correct and the corresponding Google+ API is enabled.");
|
||||||
}
|
}
|
||||||
|
|
||||||
var payload = JObject.Parse(await response.Content.ReadAsStringAsync());
|
var payload = JObject.Parse(await response.Content.ReadAsStringAsync());
|
||||||
|
|
@ -132,4 +132,4 @@ namespace Microsoft.AspNetCore.Authentication.Google
|
||||||
queryStrings[name] = value;
|
queryStrings[name] = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ namespace Microsoft.AspNetCore.Authentication.MicrosoftAccount
|
||||||
var response = await Backchannel.SendAsync(request, Context.RequestAborted);
|
var response = await Backchannel.SendAsync(request, Context.RequestAborted);
|
||||||
if (!response.IsSuccessStatusCode)
|
if (!response.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
throw new HttpRequestException($"Failed to retrived Microsoft user information ({response.StatusCode}) Please check if the authentication information is correct and the corresponding Microsoft API is enabled.");
|
throw new HttpRequestException($"Failed to retrived Microsoft user information ({response.StatusCode}) Please check if the authentication information is correct and the corresponding Microsoft Account API is enabled.");
|
||||||
}
|
}
|
||||||
|
|
||||||
var payload = JObject.Parse(await response.Content.ReadAsStringAsync());
|
var payload = JObject.Parse(await response.Content.ReadAsStringAsync());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue