Update google auth endpoint to v2 #1307

This commit is contained in:
Chris Ross (ASP.NET) 2018-02-28 10:01:09 -08:00
parent cc8acdff57
commit 21acbf06e8
2 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Authentication.Google
public static readonly string DisplayName = "Google";
public static readonly string AuthorizationEndpoint = "https://accounts.google.com/o/oauth2/auth";
public static readonly string AuthorizationEndpoint = "https://accounts.google.com/o/oauth2/v2/auth";
public static readonly string TokenEndpoint = "https://www.googleapis.com/oauth2/v4/token";

View File

@ -457,7 +457,7 @@ namespace Microsoft.AspNetCore.Authentication.Google
var transaction = await server.SendAsync("https://example.com/challenge");
Assert.Equal(HttpStatusCode.Redirect, transaction.Response.StatusCode);
var location = transaction.Response.Headers.Location.ToString();
Assert.Contains("https://accounts.google.com/o/oauth2/auth?response_type=code", location);
Assert.Contains("https://accounts.google.com/o/oauth2/v2/auth?response_type=code", location);
Assert.Contains("&client_id=", location);
Assert.Contains("&redirect_uri=", location);
Assert.Contains("&scope=", location);