Questions tagged [oauth2client]

[DEPRECATED] The oauth2client python library made it easy to connect to resources protected by OAuth2.0. The library is deprecated. Use google-auth and oauthlib instead.

Deprecation Notice:

oauth2client is now deprecated. No more features will be added to the libraries and the core team is turning down support. We recommend you use google-auth and oauthlib. For more details on the deprecation, see oauth2client deprecation.


The oauth2client library comes as part of the google-api-python-client, but is also available as a separate download if you just need the OAuth 2.0 capabilities.

The library supports these Python environments:

  1. Python 2.4, 2.5, 2.6, 2.7
  2. Google App Engine
  3. Django

This is a pure Python library that can be used from any platform. Samples are included for Google App Engine, and Django. The library has been tested against the Google and DailyMotion implementations of OAuth 2.0.

210 questions
3
votes
2 answers

Error trying to authenticate a web application with Oauth2 and Strava using Spring Boot

I’m trying to use Strava to authenticate customers that want to use my web application using Spring Boot, and I’m stuck in this error: .s.o.c.w.OAuth2LoginAuthenticationFilter : Authentication…
3
votes
0 answers

Upgrading a Python Script from oauth2client to google-auth

I would like to upgrade the following code from oauth2client to google-auth. Yes, this code does work and is a copy paste from the Google demo on their site. from __future__ import print_function from googleapiclient.discovery import build from…
3
votes
0 answers

Python 2.7.11 httplib2 throws CERTIFICATE_VERIFY_FAILED for the wrong certificate for SSL SNI website

I have a website that's accessible through multiple URL's, 2 of which have SSL certificates, which are served using SSL SNI (the entire thing is served using nginx). This setup worked fine for browsers as well as Python 2.7.11 code that monitors the…
Itamar
  • 1,089
  • 1
  • 10
  • 18
3
votes
1 answer

Gspread to access google spreadsheet: HttpAccessTokenRefreshError, invalid JWT

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 =…
Nick
  • 41
  • 7
3
votes
1 answer

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 =…
3
votes
1 answer

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…
gsinha
  • 1,165
  • 2
  • 18
  • 43
3
votes
2 answers

Which flag for run_flow() will simulate the now deprecated run()

I am trying to authenticate my credentials to access the GMail API. Previously I did this using the run() method from OAuth2, and the code credentials = tools.run(flow, STORAGE, http=http) but this is now a deprecated method. I am now using the…
3
votes
1 answer

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…
3
votes
1 answer

Offline refresh token using Google APIs

I'm trying to use Google Analytics API and have access while the user is offline. I use the oauth2decorator_from_clientsecrets to get the credentials initially(which should request offline access by default). I am able to access the API for 1 hour…
AshClarke
  • 2,990
  • 5
  • 21
  • 27
3
votes
2 answers

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…
bolei
  • 156
  • 5
  • 13
2
votes
0 answers

how can state parameter prevent CSRF attacks

In the OAuth2 authorization grant flow, the client application passes a state parameter to the authorize endpoint. When the state parameter is visible in the browser url, how does state parameter prevent CSRF attacks.
zilcuanu
  • 3,451
  • 8
  • 52
  • 105
2
votes
2 answers

Web security setup with multiple authentication methods

I am building a user authentication micro service for learning purpose using Spring Boot. I have already developed separately 3 different user authentication methods as 3 different projects (one of using PostgreSQL database with JWT authentication,…
2
votes
1 answer

from_db_value() missing 1 required positional argument: 'context'

Trying to create google login for django using googleapiclient and oauth2client. I am able to open home page, and getting redirected to google login successfully. Once after sign-in, it is redirecting to home page where I'm receiving this…
2
votes
2 answers

How do I specify DRF oauth required_scopes in function based api_view?

I'm trying to make my function based rest framework views which use the @api_view decorator with the Django OAuth Rest Framework Toolkit, where I'm using TokenHasScope as the permission_class. However, this needs a mandatory attribute called…
2
votes
0 answers

oauth2client TypeError: super(type, obj): obj must be an instance or subtype of type

Set-up I'm using gspread to manipulate a google sheet with Python. All used to work fine, but now I'm getting an error when I try to use the credentials. All is set-up according to the great manual on Twillio.…
LucSpan
  • 1,831
  • 6
  • 31
  • 66
1 2
3
13 14