File tree 3 files changed +5
-7
lines changed
src/Security/Authentication
3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,5 @@ public static class GoogleDefaults
34
34
/// <summary>
35
35
/// The Google endpoint that is used to gather additional user information.
36
36
/// </summary>
37
- /// <remarks>
38
- /// For more details about this endpoint, see <see href="https://developers.google.com/apis-explorer/#search/oauth2/oauth2/v2/"/>.
39
- /// </remarks>
40
- public static readonly string UserInformationEndpoint = "https://www.googleapis.com/oauth2/v2/userinfo" ;
37
+ public static readonly string UserInformationEndpoint = "https://www.googleapis.com/oauth2/v3/userinfo" ;
41
38
}
Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ public GoogleOptions()
25
25
Scope . Add ( "profile" ) ;
26
26
Scope . Add ( "email" ) ;
27
27
28
- ClaimActions . MapJsonKey ( ClaimTypes . NameIdentifier , "id" ) ;
28
+ ClaimActions . MapJsonKey ( ClaimTypes . NameIdentifier , "id" ) ; // v2
29
+ ClaimActions . MapJsonKey ( ClaimTypes . NameIdentifier , "sub" ) ; // v3
29
30
ClaimActions . MapJsonKey ( ClaimTypes . Name , "name" ) ;
30
31
ClaimActions . MapJsonKey ( ClaimTypes . GivenName , "given_name" ) ;
31
32
ClaimActions . MapJsonKey ( ClaimTypes . Surname , "family_name" ) ;
Original file line number Diff line number Diff line change @@ -1026,11 +1026,11 @@ private HttpMessageHandler CreateBackchannel()
1026
1026
refresh_token = "Test Refresh Token"
1027
1027
} ) ;
1028
1028
}
1029
- else if ( req . RequestUri . GetComponents ( UriComponents . SchemeAndServer | UriComponents . Path , UriFormat . UriEscaped ) == "https://www.googleapis.com/oauth2/v2 /userinfo" )
1029
+ else if ( req . RequestUri . GetComponents ( UriComponents . SchemeAndServer | UriComponents . Path , UriFormat . UriEscaped ) == "https://www.googleapis.com/oauth2/v3 /userinfo" )
1030
1030
{
1031
1031
return ReturnJsonResponse ( new
1032
1032
{
1033
- id = "Test User ID" ,
1033
+ sub = "Test User ID" ,
1034
1034
name = "Test Name" ,
1035
1035
given_name = "Test Given Name" ,
1036
1036
family_name = "Test Family Name" ,
You can’t perform that action at this time.
0 commit comments