Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update revocation, token, userinfo endpoints #127

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand Down
2 changes: 1 addition & 1 deletion GTMAppAuth/Sources/GTMAppAuthFetcherAuthorization.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions GTMAppAuth/Sources/GTMOAuth2KeychainCompatibility.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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.
Expand Down