Giter Site home page Giter Site logo

Google userinfo request failure about pyoidc HOT 2 CLOSED

rdbhost avatar rdbhost commented on July 24, 2024
Google userinfo request failure

from pyoidc.

Comments (2)

rohe avatar rohe commented on July 24, 2024

3 jun 2015 kl. 05:53 skrev David Keeney [email protected]:

I am working with the rp3.py example, trying to get it working with a google email address; I uncommented the google portion of the conf.py, and edited in my client_id and secret. The return_uri is set to /authz_cb, as the rp3.py file does not seem to have a ’/google' path case in its 'application' function.

Should make the code more intelligent on this topic.

The login process completes the round-trip to and from google's server, but the login process fails at the do_user_info_request, with a 401 error and 'invalid_token' and 'Invalid Credentials' in the json body.

Yes, when getting userinfo the access token, according to the standard, can be sent in two ways: if GET in the HTTP header or as a POST body. POST is the default for pyoidc, Google prefers GET.

Made a slight change to the code and added a parameter to the configuration to make it work with Google.

Another change Google has applied is that the user information now is actually returned in the IdToken so getting the
information from the userinfo_endpoint is actually overkill :-/ but I’ll let it remain.

  • Roland

"It is the consequence of humanity. We are all formed of frailty and error; let us pardon reciprocally each others’ folly - that is the first law of nature.” - Voltaire

from pyoidc.

rdbhost avatar rdbhost commented on July 24, 2024

Wow. Fixed within 10 hours.

Awesome response!

from pyoidc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.