oauth2client

HybridAuth with Google provider randomly returns “invalid_request” when authenticating

情到浓时终转凉″ 提交于 2019-12-07 09:59:36
问题 We use Google OAuth2 to authenticate our users into an internal application, using HybridAuth 2.4.0 and it went well until about a week ago where we started to see more and more random "invalid_request" responses from https://accounts.google.com/o/oauth2/token. When I say "random", today it's more likely: doesn't work then works systematically for about one minute (multiple authentication in a row will succeed) to stop working again (ie: "invalid_request" response). We tried upgrading to the

Windows local appengine usage: oauth2client ImportError

一曲冷凌霜 提交于 2019-12-06 07:23:52
I m working with App Engine Standard, developing a Python backend service and, at some point, I told myself: "Hey why don't you try out and run the server locally while using the remote Datastore" I can run this code locally but I couldn't figure out why the remote_api_stub throws the error : " File "C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\ext\remote_api\remote_api_stub.py", line 1003, in ConfigureRemoteApiForOAuth 'oauth2client module: %s' % e) ImportError: Use of OAuth credentials requires the oauth2client module: No module named

HybridAuth with Google provider randomly returns “invalid_request” when authenticating

冷暖自知 提交于 2019-12-05 17:01:24
We use Google OAuth2 to authenticate our users into an internal application, using HybridAuth 2.4.0 and it went well until about a week ago where we started to see more and more random "invalid_request" responses from https://accounts.google.com/o/oauth2/token . When I say "random", today it's more likely: doesn't work then works systematically for about one minute (multiple authentication in a row will succeed) to stop working again (ie: "invalid_request" response). We tried upgrading to the latest version of HybridAuth (2.8.0 and now 2.8.1), it didn't fix the encountered issue. Also checked

AttributeError: 'module' object has no attribute 'SignedJwtAssertionCredentials'

删除回忆录丶 提交于 2019-12-04 19:59:40
问题 Problem : I've been using Python Script Samples by Google to upload the apk to Play Store and to get list of apps published via my account (list_apks.py and upload_apk.py ). However recently it started breaking. I've tried to update the packages like google-api-python-client , oath2client etc by doing pip install --update packagename but it didn't help. Logs : This if while listing apk's: Determining latest version for my.package.name... error 25-Feb-2016 06:30:52 Traceback (most recent call

AttributeError: 'module' object has no attribute 'SignedJwtAssertionCredentials'

你。 提交于 2019-12-03 14:08:28
Problem : I've been using Python Script Samples by Google to upload the apk to Play Store and to get list of apps published via my account ( list_apks.py and upload_apk.py ). However recently it started breaking. I've tried to update the packages like google-api-python-client , oath2client etc by doing pip install --update packagename but it didn't help. Logs : This if while listing apk's: Determining latest version for my.package.name... error 25-Feb-2016 06:30:52 Traceback (most recent call last): error 25-Feb-2016 06:30:52 File "list_apks.py", line 80, in <module> error 25-Feb-2016 06:30:52

Django 1.7 google oauth2 token validation failure

笑着哭i 提交于 2019-12-03 13:04:09
I'm trying to get through the process of authenticating a Google token for accessing a user's calendar within a Django application. Although I've followed several indications found on the web, I'm stuck with a 400 error code response to my callback function (Bad Request). views.py # -*- coding: utf-8 -*- import os import argparse import httplib2 import logging from apiclient.discovery import build from oauth2client import tools from oauth2client.django_orm import Storage from oauth2client import xsrfutil from oauth2client.client import flow_from_clientsecrets from django.http import

got 'invalid_grant' in oauth2 SignedJwtAssertionCredentials

霸气de小男生 提交于 2019-12-03 06:19:45
I am trying to make an oauth2 access_token in a server-to-server JSON API scenario. But it failed with invalid_grant error, please help. from oauth2client.client import SignedJwtAssertionCredentials KEY_FILE = 'xxxxxxxxxxxx-privatekey.p12' with open(KEY_FILE, 'r') as fd: key = fd.read() SERVICE_ACCOUNT_EMAIL = 'xxxxxx.apps.googleusercontent.com' credentials = SignedJwtAssertionCredentials(SERVICE_ACCOUNT_EMAIL, key, scope="https://www.googleapis.com/auth/datastore https://www.googleapis.com/auth/userinfo.email", token_uri='https://accounts.google.com/o/oauth2/token') assertion = credentials.

Issues with Generating Authorization code and User Token using Apache OAuth client 2.0 library in Java

孤人 提交于 2019-12-02 10:58:50
I trying to Automate the User Level Token Creation/Generation process (REST/Authorization Grant Code) using Apache OAuth Client 2.0 Library in Java. And below is the Code that am using which i got from https://cwiki.apache.org/confluence/display/OLTU/OAuth+2.0+Client+Quickstart , `/*Previous Codes & starting the below with Try/Catch*/ OAuthClientRequest request = OAuthClientRequest .authorizationLocation("Authorization URL") .setClientId("ClientID") .setRedirectURI("Redirect URL") .buildQueryMessage(); request.getLocationUri(); OAuthAuthzResponse oar = OAuthAuthzResponse.oauthCodeAuthzResponse

Gspread to access google spreadsheet: HttpAccessTokenRefreshError, invalid JWT

谁说胖子不能爱 提交于 2019-12-02 00:13:11
问题 I'm struggling to get access to a google spreadsheet with python 2.7 using gspread. Here's what I have so far: import gspread from oauth2client.service_account import ServiceAccountCredentials scope = ['https://spreadsheets.google.com/feeds'] credentials = ServiceAccountCredentials.from_json_keyfile_name( 'credentials.json', scope) gc = gspread.authorize(credentials) wks = gc.open("PracticeOpsBS").sheet1 The result is a bunch of stuff that I think is showing me what is going on, resulting in

Unrecognized arguments using oauth2 and Google APIs

江枫思渺然 提交于 2019-12-01 20:47:56
问题 I'm using the Google API services in some scripts and having some problems. This error is something weird, but here we go. I have a script that is listing my Google Drive files. from apiclient import discovery from httplib2 import Http from oauth2client import file, client, tools SCOPES = 'https://www.googleapis.com/auth/drive.readonly.metadata' store = file.Storage('storage.json') creds = store.get() if not creds or creds.invalid: flow = client.flow_from_clientsecrets('client_secret.json',