Skip to content
This repository has been archived by the owner on Jul 22, 2021. It is now read-only.

Support proxy #198

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 3 additions & 1 deletion pydrive/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,10 @@ def Authenticate(self, code):
"""
if self.flow is None:
self.GetFlow()
if self.http is None:
self.http = httplib2.Http(timeout=self.http_timeout)
try:
self.credentials = self.flow.step2_exchange(code)
self.credentials = self.flow.step2_exchange(code, http=self.http)
except FlowExchangeError as e:
raise AuthenticationError('OAuth2 code exchange failed: %s' % e)
print('Authentication successful.')
Expand Down