Skip to content

Commit b633f7c

Browse files
committed
[WIP] extensions/GitHubAuth/lib/Client: Fix GitHub login
1 parent f8e86a8 commit b633f7c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

extensions/GitHubAuth/lib/Client.pm

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,12 @@ sub get_access_token {
9595

9696
sub get_user_emails {
9797
my ($self, $access_token) = @_;
98-
my $uri = URI->new(GH_USER_EMAILS_URI);
99-
$uri->query_form(access_token => $access_token);
10098

101-
my $response = $self->user_agent->get($uri, Accept => 'application/json');
99+
my $response = $self->user_agent->get(
100+
GH_USER_EMAILS_URI,
101+
Accept => 'application/json',
102+
Authorization => 'token ' . $access_token
103+
);
102104

103105
return $self->_handle_response($response);
104106
}

0 commit comments

Comments
 (0)