Skip to content

Commit 21acbf0

Browse files
committed
Update google auth endpoint to v2 #1307
1 parent cc8acdf commit 21acbf0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Microsoft.AspNetCore.Authentication.Google/GoogleDefaults.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public static class GoogleDefaults
1212

1313
public static readonly string DisplayName = "Google";
1414

15-
public static readonly string AuthorizationEndpoint = "https://accounts.google.com/o/oauth2/auth";
15+
public static readonly string AuthorizationEndpoint = "https://accounts.google.com/o/oauth2/v2/auth";
1616

1717
public static readonly string TokenEndpoint = "https://www.googleapis.com/oauth2/v4/token";
1818

test/Microsoft.AspNetCore.Authentication.Test/GoogleTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ public async Task ChallengeWillTriggerRedirection()
457457
var transaction = await server.SendAsync("https://example.com/challenge");
458458
Assert.Equal(HttpStatusCode.Redirect, transaction.Response.StatusCode);
459459
var location = transaction.Response.Headers.Location.ToString();
460-
Assert.Contains("https://accounts.google.com/o/oauth2/auth?response_type=code", location);
460+
Assert.Contains("https://accounts.google.com/o/oauth2/v2/auth?response_type=code", location);
461461
Assert.Contains("&client_id=", location);
462462
Assert.Contains("&redirect_uri=", location);
463463
Assert.Contains("&scope=", location);

0 commit comments

Comments
 (0)