Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Commit db70095

Browse files
committed
Update google token endpoint to v4
1 parent bfbe7ec commit db70095

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

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

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

1010
public static readonly string AuthorizationEndpoint = "https://accounts.google.com/o/oauth2/auth";
1111

12-
public static readonly string TokenEndpoint = "https://www.googleapis.com/oauth2/v3/token";
12+
public static readonly string TokenEndpoint = "https://www.googleapis.com/oauth2/v4/token";
1313

1414
public static readonly string UserInformationEndpoint = "https://www.googleapis.com/plus/v1/people/me";
1515
}

test/Microsoft.AspNetCore.Authentication.Test/Google/GoogleMiddlewareTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ public async Task ReplyPathWillAuthenticateValidAuthorizeCodeAndState(string cla
299299
{
300300
Sender = req =>
301301
{
302-
if (req.RequestUri.AbsoluteUri == "https://www.googleapis.com/oauth2/v3/token")
302+
if (req.RequestUri.AbsoluteUri == "https://www.googleapis.com/oauth2/v4/token")
303303
{
304304
return ReturnJsonResponse(new
305305
{
@@ -489,7 +489,7 @@ public async Task AuthenticatedEventCanGetRefreshToken()
489489
{
490490
Sender = req =>
491491
{
492-
if (req.RequestUri.AbsoluteUri == "https://www.googleapis.com/oauth2/v3/token")
492+
if (req.RequestUri.AbsoluteUri == "https://www.googleapis.com/oauth2/v4/token")
493493
{
494494
return ReturnJsonResponse(new
495495
{
@@ -569,7 +569,7 @@ public async Task NullRedirectUriWillRedirectToSlash()
569569
{
570570
Sender = req =>
571571
{
572-
if (req.RequestUri.AbsoluteUri == "https://www.googleapis.com/oauth2/v3/token")
572+
if (req.RequestUri.AbsoluteUri == "https://www.googleapis.com/oauth2/v4/token")
573573
{
574574
return ReturnJsonResponse(new
575575
{
@@ -659,7 +659,7 @@ public async Task ValidateAuthenticatedContext()
659659
{
660660
Sender = req =>
661661
{
662-
if (req.RequestUri.AbsoluteUri == "https://www.googleapis.com/oauth2/v3/token")
662+
if (req.RequestUri.AbsoluteUri == "https://www.googleapis.com/oauth2/v4/token")
663663
{
664664
return ReturnJsonResponse(new
665665
{

0 commit comments

Comments
 (0)