Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make name field of _UserInfo nullable. Fix #3424 #3442

Merged
merged 1 commit into from
May 31, 2022

Conversation

talisk
Copy link
Contributor

@talisk talisk commented May 31, 2022

Fix #3424 .

The PR #3427 only fix the dart error. But actually pub cannot retrieve the user info.

As @bsutton said.

The symptom is that the 'name' field is not being returned by the google auth mechanism.
I've tried pub logout and then pub login with the same results.
Is there some chance that google no longer return the 'name' field in the user info response?

Reading the google documentation:
https://developers.google.com/identity/protocols/oauth2/openid-connect#server-flow
name - The user's full name, in a displayable form. Might be provided when: The request scope included the string "profile"
The ID token is returned from a token refresh. When name claims are present, you can use them to update your app's user records.

Note that this claim is never guaranteed to be present.
Note the last sentence.

We should make the name filed nullable.

Copy link
Member

@jonasfj jonasfj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+

@jonasfj jonasfj merged commit 6c63504 into dart-lang:master May 31, 2022
jonasfj pushed a commit that referenced this pull request May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dart pub login fails to write dart/pub-credentials.json after successful authentication
2 participants