diff --git a/Examples/Example-iOS/Source/GTMAppAuthExampleViewController.m b/Examples/Example-iOS/Source/GTMAppAuthExampleViewController.m index efac0855..d233b57d 100644 --- a/Examples/Example-iOS/Source/GTMAppAuthExampleViewController.m +++ b/Examples/Example-iOS/Source/GTMAppAuthExampleViewController.m @@ -226,7 +226,7 @@ - (IBAction)userinfo:(nullable id)sender { fetcherService.authorizer = self.authorization; // Creates a fetcher for the API call. - NSURL *userinfoEndpoint = [NSURL URLWithString:@"https://www.googleapis.com/oauth2/v3/userinfo"]; + NSURL *userinfoEndpoint = [NSURL URLWithString:@"https://openidconnect.googleapis.com/v1/userinfo"]; GTMSessionFetcher *fetcher = [fetcherService fetcherWithURL:userinfoEndpoint]; [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { // Checks for an error. diff --git a/Examples/Example-macOS/Source/GTMAppAuthExampleViewController.m b/Examples/Example-macOS/Source/GTMAppAuthExampleViewController.m index 1c37b416..64a2f7db 100644 --- a/Examples/Example-macOS/Source/GTMAppAuthExampleViewController.m +++ b/Examples/Example-macOS/Source/GTMAppAuthExampleViewController.m @@ -226,7 +226,7 @@ - (IBAction)userinfo:(nullable id)sender { fetcherService.authorizer = self.authorization; // Creates a fetcher for the API call. - NSURL *userinfoEndpoint = [NSURL URLWithString:@"https://www.googleapis.com/oauth2/v3/userinfo"]; + NSURL *userinfoEndpoint = [NSURL URLWithString:@"https://openidconnect.googleapis.com/v1/userinfo"]; GTMSessionFetcher *fetcher = [fetcherService fetcherWithURL:userinfoEndpoint]; [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { diff --git a/GTMAppAuth/Sources/GTMAppAuthFetcherAuthorization.m b/GTMAppAuth/Sources/GTMAppAuthFetcherAuthorization.m index a96de8e9..2211f20d 100644 --- a/GTMAppAuth/Sources/GTMAppAuthFetcherAuthorization.m +++ b/GTMAppAuth/Sources/GTMAppAuthFetcherAuthorization.m @@ -198,7 +198,7 @@ + (OIDServiceConfiguration *)configurationForGoogle { NSURL *authorizationEndpoint = [NSURL URLWithString:@"https://accounts.google.com/o/oauth2/v2/auth"]; NSURL *tokenEndpoint = - [NSURL URLWithString:@"https://www.googleapis.com/oauth2/v4/token"]; + [NSURL URLWithString:@"https://oauth2.googleapis.com/token"]; OIDServiceConfiguration *configuration = [[OIDServiceConfiguration alloc] initWithAuthorizationEndpoint:authorizationEndpoint diff --git a/GTMAppAuth/Sources/GTMOAuth2KeychainCompatibility.m b/GTMAppAuth/Sources/GTMOAuth2KeychainCompatibility.m index c98d07f9..b39e742f 100644 --- a/GTMAppAuth/Sources/GTMOAuth2KeychainCompatibility.m +++ b/GTMAppAuth/Sources/GTMOAuth2KeychainCompatibility.m @@ -308,17 +308,17 @@ + (NSURL *)googleAuthorizationURL { } + (NSURL *)googleTokenURL { - NSString *str = @"https://www.googleapis.com/oauth2/v4/token"; + NSString *str = @"https://oauth2.googleapis.com/token"; return (NSURL *)[NSURL URLWithString:str]; } + (NSURL *)googleRevocationURL { - NSString *urlStr = @"https://accounts.google.com/o/oauth2/revoke"; + NSString *urlStr = @"https://oauth2.googleapis.com/revoke"; return (NSURL *)[NSURL URLWithString:urlStr]; } + (NSURL *)googleUserInfoURL { - NSString *urlStr = @"https://www.googleapis.com/oauth2/v3/userinfo"; + NSString *urlStr = @"https://openidconnect.googleapis.com/v1/userinfo"; return (NSURL *)[NSURL URLWithString:urlStr]; } diff --git a/README.md b/README.md index da1f6093..cf7f2d53 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ directly: NSURL *authorizationEndpoint = [NSURL URLWithString:@"https://accounts.google.com/o/oauth2/v2/auth"]; NSURL *tokenEndpoint = - [NSURL URLWithString:@"https://www.googleapis.com/oauth2/v4/token"]; + [NSURL URLWithString:@"https://oauth2.googleapis.com/token"]; OIDServiceConfiguration *configuration = [[OIDServiceConfiguration alloc] @@ -193,7 +193,7 @@ GTMSessionFetcherService *fetcherService = [[GTMSessionFetcherService alloc] ini fetcherService.authorizer = self.authorization; // Creates a fetcher for the API call. -NSURL *userinfoEndpoint = [NSURL URLWithString:@"https://www.googleapis.com/oauth2/v3/userinfo"]; +NSURL *userinfoEndpoint = [NSURL URLWithString:@"https://openidconnect.googleapis.com/v1/userinfo"]; GTMSessionFetcher *fetcher = [fetcherService fetcherWithURL:userinfoEndpoint]; [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) { // Checks for an error.