#python #django #google-authentication #google-authenticator #google-auth-library
Вопрос:
Я пытался добавить пользовательский return_uri
, но теперь он позволяет добавлять.
он назначает по умолчанию свой собственный URL-адрес локального хоста.
if not creds or not creds.valid:
if creds and creds.expired and creds.refresh_token:
creds.refresh(Request())
else:
flow = InstalledAppFlow.from_client_secrets_file(
'client_secrets.json', SCOPES)
creds = flow.run_local_server()
# Save the credentials for the next run
with open('token.json', 'w') as token:
token.write(creds.to_json())
Пожалуйста, кто-нибудь может помочь мне с этим