Comments (5)
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.
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.
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.
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.
I'm closing this as a duplicate of #69.
from oauth2.
Related Issues (20)
- yahoo always ask for permissions when user login
- Yahoo email retriever social API
- Library use old CommonServiceLocator version HOT 3
- documention HOT 1
- Instagram Problem HOT 7
- Can Support Amazon (Login in Amazon)? HOT 1
- Initialize Client from stored token HOT 1
- Example config for .net core HOT 10
- Using OAuth2 in winforms project HOT 1
- Update GitHub OAuth Client HOT 4
- Support for HOT 1
- Help Wanted - Twitter - I can't authenticate you HOT 1
- Exception of type 'OAuth2.Client.UnexpectedResponseException' was thrown. when retrieving User info from Linked In HOT 2
- Integration for Microsoft Azure Login APIs HOT 4
- VkClient return error HOT 5
- 谷歌登录有bug HOT 1
- New Refresh Tokens are not saved when using OAuth2Client.GetCurrentTokenAsync HOT 7
- Any plans to support RestSharp v107+? HOT 2
- What is the LICENSE for this library? HOT 1
- Unable to resolve 'OAuth2 (>= 0.10.3)' for 'net8.0-windows'. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oauth2.