Questions tagged [oauth2client]

1

votes
1

answer
240

Views

oAuth2 security issue with clinet_id and secret key : user can press inspect element and earn clinet_id and secret key

I write a rest api with yii2 and i am using oAuth2 , the problem is when user want login , client web application should send request to get token , request should contain client_id and secret_key and username and password in this case user can simply inspect element and click to network and see pos...
zia
1

votes
0

answer
331

Views

How to find user's email ID? - Google Oauth2 API PHP Client

I am implementing an Audio library manager which uses user's google drive as backend storage. I am using PHP (google-api-php-client-2.2.1) to get the user's authorization for accessing his/her google drive. So far I am able to receive access token and refresh token using example code from google (ht...
paul_brian
1

votes
1

answer
554

Views

from oauth2client.service_account import ServiceAccountCredentials : cannot import name 'opentype' [duplicate]

This question already has an answer here: Import error: cannot import name 'opentype' 2 answers I use python 3.6.0. I want to play with the Google Drive API. When I import oauth2client.service_account I get this error : Traceback (most recent call last): File 'test.py', line 3, in from oauth2clie...
Aaron Aben Danan
1

votes
0

answer
22

Views

what is the method or class that is generating access token and refresh token in django oauth2_provide

I am trying to create an api that will generate an oauth2_provider access token and refresh token, and it will store in oauth2_provider models. Actually i am using below API to generate both tokens path('o/', include('oauth2_provider.urls', namespace='oauth2_provider')), But what i want to do is cre...
Polaiah Bodeddula
1

votes
1

answer
549

Views

iOS: OAuth2Client and Google

I'm trying to get Google's OAuth2 working for user verification in an iOS app. I'm using the OAuth2Client api but cannot get it working with google. It appears that google only accepts http://localhost or urn:ietf:wg:oauth:2.0:oob as the redirect url. Stopping me from using a custom schema to trigge...
drekka
1

votes
1

answer
525

Views

google oauth2client in app engine

I'm writing a program that uses oauth2 library of google for some app in google-app-engine. When I run the server on my machine, it raises an IOError exception of this sort -- File '/home/deploy/Downloads/google_appengine/google/appengine/tools/dev_appserver_import_hook.py', line 592, in __init__ ra...
shashydhar
1

votes
1

answer
95

Views

How should an application add/remove scopes to an existing grant?

Tried adding additional scopes using oauth2client's OAuth2DecoratorFromClientSecrets via the scopes parameter. I believe users of an application would prefer to gradually expand privileges; as its needed, and as trust forms... What is the best way to add/expand/remove scopes when the application has...
12345
1

votes
1

answer
2.8k

Views

Google+ Domains API 403 Forbidden

I'm trying to create Circles with the Google+ API, but I'm kinda stuck, this is my code, it was more or less copied from the official API documentation (yes I know it doesn't create Circle, but the issue is the same) import httplib2 from apiclient.discovery import build from oauth2client.client impo...
kviktor
1

votes
1

answer
391

Views

How to get data from NXOAuth2Request response

I'm writing my first iOS app. It includes API calls through OAuth2Client. The problem is when calling the AdvAPI getUser function. A GET request is made through NXOAuth2Request which deals with the response data in responseHandler and variable result is set to an NSDictionary. The result however is...
Dandan
1

votes
1

answer
1.9k

Views

CryptoUnavailableError: No crypto library available (using oauth2client in google app engine)

I am using gspread to connect my application to spreadsheet and for that I am using the following code import json import gspread from oauth2client.client import SignedJwtAssertionCredentials json_key = json.load(open('service_account.json')) scope = ['https://spreadsheets.google.com/feeds'] crede...
rhemon19
1

votes
1

answer
164

Views

oauth2client for Blogger posting from a telegram bot in Heroku server

I have just deployed my telegram bot with python-telegram-bot in Heroku. My webhooks bot uses blogger for posting certain things. I did this until now with a sligthly modified custom version of sample_tools, from module google_apli_client. my_tools: ''' dependencies: pip3 install --upgrade google-a...
madtyn
1

votes
1

answer
280

Views

Exchange the Authorization Code for an Access Token In OAuth 2.0

I am trying to exchange the authorization code (which is in the url of this page) for an access token using oAuth 2.0. I am running the following php code and am getting an error (http error 500). I can't figure out what is wrong with the following code. I have deleted the actual client id, etc...
Rick
1

votes
1

answer
94

Views

Using tools.run_flow() raises SSLHandshake “certificate verify” error in Google Sheets API tutorial

I'm am pretty much following the Google Sheets getting started (in Python) to a tee. I've gotten the program to work on my Mac laptop, but it is failing as I am trying to run it on Windows. So far, I've checked that we do not have the firewall enabled on the machine. Below is the error that appears...
John Snow
1

votes
1

answer
737

Views

OAuth 2.0 Implicit Grant Flow - clientId and accessToken exposure security

Since OAuth 2.0 Implicit Grant Flow exposes its mechanism e.g. using JavaScript, in the client app to the resource owner, the client Id and the access token are exposed. I have not been able to find a clear answer on what can be done to prevent from exploiting the exposure. What are some measures to...
wonster
1

votes
1

answer
106

Views

Unable to patch user with Oauth Custom Schema using delegated user G-Suite Admin SDK Python

I'm trying to patch a user with some custom user fields using a Google Oauth2 service account but I get a 403 Unauthorized response if I delegate to any other user than myself. I've effectively been guided by the following document. https://developers.google.com/api-client-library/python/auth/servi...
Mike Kirk
0

votes
0

answer
7

Views

buildozer - kivy+gspread+oauth2client app crashes on start

After installing modules, I followed instructions to build an apk file. My app uses gspread and oauth2client. Put all the requirements in the buildozer.spec file. I run buildozer android debug deploy run logcat then the application crash after loading screen. The first thing I think the problem is...
DrCreampuff
1

votes
2

answer
2.1k

Views

OAuthWebSecurity.IsAuthenticatedWithOAuth - Method not found

I'm implementing an OAuth2Client and when I call var result = OAuthWebSecurity.VerifyAuthentication(); I result.IsSuccessful is equals to false. I've seen that 'OAuthWebSecurity.IsAuthenticatedWithOAuth' method has the following exception: 'Microsoft.Web.WebPages.OAuth.OAuthWebSecurity.IsAuthentica...
Guilherme Ferreira
6

votes
2

answer
1.8k

Views

Proxy configuration in OAuth2RestTemplate

I need to consume an API which is secured by OAuth2. For that I am using OAuth2RestTemplate. But am getting below error: java.net.ConnectException: Connection timed out: connect This is happening due to proxy issue. I Know how to set proxy in RestTemplate : SimpleClientHttpRequestFactory clientHt...
aks2012
3

votes
1

answer
2.5k

Views

'AttributeError: 'module' object has no attribute 'file'' when using oauth2client with Google Calendar

I'm using the example script for google calendars python api (https://developers.google.com/google-apps/calendar/quickstart/python#step_3_set_up_the_sample) to try and print out all the calendar events. However I am getting an error of: AttributeError: 'module' object has no attribute 'file' from t...
JMzance
3

votes
2

answer
2.2k

Views

Spring security Oauth2 client ClientAuthenticationProcessingFilter

I'm working on spring-security-oauth2-1.0.3.RELEASE, trying to set up an oauth client to get user authenticated with google. I spent quit a while on this and still don't find much good article explaining very clearly. What I'm doing is to put an OAuth2ClientAuthenticationProcessingFilter into the fi...
bolei
3

votes
1

answer
1.6k

Views

OAuth2 library for Erlang

In my project I need a client OAuth2 library. The project is written in Erlang. What are the options for the language? PS I am a newbie in Erlang, so documentation/examples are a must.
Vlad
6

votes
1

answer
3k

Views

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

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...
Shobhit Puri
2

votes
1

answer
2.9k

Views

How to obtain oauth 2.0 token from google plus api in android?

I have a problem with obtaining oauth 2.0 token from google API. I am currently writing app for android, where I want to have three methods of signing in - via facebook (done), via custom oauth 2.0 provider (also done) and via google plus - it makes many problems for me. I need to get access token o...
Zkart
3

votes
1

answer
2.2k

Views

gmail api gives failedPrecondition error

I can't get gmail api to work. I'm using server-to-server authentication with JWT. google-api-python-client==1.4.0 httplib2==0.9 oauth2client==1.4.7 pycrypto==2.6.1 My code looks like this. with open(CLIENT_SECRET_FILE) as f: data = json.loads(f.read()) private_key = data['private_key'] client_email...
Tadas Vilkeliskis
2

votes
1

answer
288

Views

Python library that supports setting oauth response_type

The server I am working with does not support code as a response type. I attempted to use flask-oauth but it does not support setting a response type. I was wondering whether it was possible to configure flask-oauth to change it to token. I have tried doing it by setting: request_token_params = {'re...
24

votes
3

answer
4k

Views

How to get Google Analytics credentials without gflags - using run_flow() instead?

This may take a second to explain so please bear with me: I'm working on a project for work that requires me to pull in google analytics data. I originally did this following this link, so after installing the API client pip install --upgrade google-api-python-client and setting things up like the c...
John Ruddell
5

votes
1

answer
2.1k

Views

oauth2client Credentials refresh_token becomes null

Backgound I got access_token to Google API using the google-api-python-client django_sample. To have offline access, I've added FLOW.params['access_type'] = 'offline'. Stored credentials_json = credentials.to_json(). It contains a refresh_token. Restored the credentials Credentials.new_from_json(cre...
Michael
1

votes
1

answer
633

Views

Google Python API tries to import the deprecated oauth2client.contrib.multistore_file

I am trying to build the discovery docs for my endpoints application, but I am getting the following error: [email protected]:~/backend$ endpointscfg.py get_discovery_doc [PROJECT_NAME] Traceback (most recent call last): File '/home/pc/Downloads/google-cloud-sdk/bin/endpointscfg.py', line 10, in import bootstr...
Borja
2

votes
1

answer
3.7k

Views

org.springframework.web.client.RestTemplate - POST request for resulted in 400 (Bad Request); invoking error handler

I'm looking to developed a Spring OAuth2RestTemplate code and taken a reference from Access tokens using 2 legged Oauth 2.0 and Apache OauthClient. There are two suggestions been given, First suggestion using Apache Oltu worked absolutely fine to me. Now, I am looking to developed second option whic...
2

votes
1

answer
1.1k

Views

Google App Engine - Endpoints API - Consuming from another App Engine App -python

I am trying to execute a function provided by one app engine app that I have written (python) that uses Endpoints, in a second similar app engine app. I currently have both app engine applications running on appspot using endpoints with oauth2. I have a working javascript client that consumes the en...
user3292469
3

votes
1

answer
3.3k

Views

PyCrypto Errors with .p12 file from Google Developer Console

I am trying to implement Google Identity Toolkit (gitkitv3) in GAE Python. After a user signs in on the website, I get the following errors: 'PKCS12 format is not supported by the PyCrpto library. ' NotImplementedError: PKCS12 format is not supported by the PyCrpto library. Try converting to a 'PEM...
gsinha
2

votes
2

answer
3.2k

Views

oauth2client.client.CryptoUnavailableError: No crypto library available

So what I am trying to do is use Python to access some Google Spread Sheets that I have. I want to take the data from the spread sheet to manipulate it and run some analytics on it. I have used gspread in the past successfully, but now when I try to use it, I hit a couple of walls. When I run the fo...
Thomas
5

votes
1

answer
256

Views

GAE - unable to fetch URL from BigQuery API

Our integration platform now gets couple of 'Unable to fetch URL: ...' errors everyday. I don't know what's the cause of this. First GAE tries to authorize with OAuth2 from within application to BigQuery through the BigQuery API. it tries in every second for more than 30 seconds (that's just 1 of 30...
Adam Pawluczuk
2

votes
1

answer
5k

Views

Facebook OAuth redirect_uri isn't an absolute URI. Check RFC 3986.\“,\”type\“:\”OAuthException\“,\”code\":191

I've been struggling this afternoon to put my application using facebook oauth. I am getting an error while trying to get the access token: {\'error\':{\'message\':\'redirect_uri isn't an absolute URI. Check RFC 3986.\',\'type\':\'OAuthException\',\'code\':191}} Here is my request: https://graph.fac...
Bonomi
4

votes
1

answer
618

Views

is there a deep dive on google's oauth2 scopes?

I'm looking for some deep down detailed information on google's use of oauth scopes My Drive app is working, so I get the simple use of scopes. However I have the following detailed questions/issues.. I specify scopes twice. Once in my app and then also in the API Console. What is the respective sig...
pinoyyid
14

votes
3

answer
6.6k

Views

got 'invalid_grant' in oauth2 SignedJwtAssertionCredentials

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_ACCO...
Pahud Hsieh
1

votes
2

answer
162

Views

How do I use google.auth instead of oauth2client in Python to get access to my Google Calendar

Several years ago I created a small Python program which were able to maintain my calendar using oauth2client which is now deprecated and replaced with google.auth - but I cannot find any useful documentation and my program stopped working complaining about a _module KeyError which nobody appear to...
Andrew Rump
3

votes
0

answer
735

Views

EOF error with Google oauth2client (Python, google-app-engine)

I am currently using oauth2client in my Python webapp in order to use Google's calendar API. I copied oauth2client into the root folder of my directory, and followed instructions at https://developers.google.com/google-apps/calendar/instantiate. Which means my code looks like: import httplib2 impor...
laurenzlong
3

votes
1

answer
3.7k

Views

User Registration & Login | SSO using Spring Security OAuth 2.0

I am trying to implement user registration and log in flow | SSO using Spring Security Oauth 2.0 and Google as the authentication provider. How should I initiate registration and login flow? What filter needs to be applied? In registration flow, I will needs user's details (name, email) that are par...
Kumar Sambhav
4

votes
0

answer
197

Views

How to access OAuth 2.0, REST API in GNOME 3.0 shell extension?

How would I port the OAuth 2.0 implict grant flow from a browser environment if I wanted to access the REST API beneath it through a GNOME shell extension ? How would I redirect the user to the OAuth 2.0 decision endpoint through a login screen? If it isn't possible with a OAuth 2.0 REST API in wha...
Johny Jose

View additional questions