Coder Social home page Coder Social logo

Comments (5)

agibalov avatar agibalov commented on June 24, 2024

Fixed by changing

scope="https://www.googleapis.com/auth/userinfo.email"

to

scope="https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email"

Not sure if it's a workaround or by design.

from oauth2.

titarenko avatar titarenko commented on June 24, 2024

Hi,

Thank you for update! And excuse me for late response.

Yes, when there is no (or not enough) persmissions, Google will answer with error instead of access token. That response is not handled properly, causing faceless ArgumentNullException with poor context.

What I will do next is proper handling of error responses for GoogleClient. And yes, this solution described by is closer to "by design" than to "workaround".

Thanks again for helping to ensure better quality of OAuth2 library!

from oauth2.

rtumaykin avatar rtumaykin commented on June 24, 2024

Actually this is not a google that throws this exception. When you ask to provide only email and nothing else, all other properties such as First name, Last name, etc aren't passed back and therefore the method used in UserInfo creation throws an exception as it does not handle null values.

from oauth2.

niemyjski avatar niemyjski commented on June 24, 2024

Yes, this is logged in a second issue. It has to do with not using SafeGet. Would you mind submitting a pull request for this?

from oauth2.

niemyjski avatar niemyjski commented on June 24, 2024

I'm closing this as a duplicate of #69.

from oauth2.

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.