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

FR: Parse screenName from ProvidedUserInfo #610

Open
sixstone-qq opened this issue Apr 9, 2024 · 0 comments
Open

FR: Parse screenName from ProvidedUserInfo #610

sixstone-qq opened this issue Apr 9, 2024 · 0 comments

Comments

@sixstone-qq
Copy link

Describe your environment

  • Operating System version: Linux
  • Firebase SDK version: v4.13.0
  • Library version: v4.13.0
  • Firebase Product: auth

Describe the problem

Steps to reproduce:

When a user is logged in using GitHub as provider it returns the screenName aka login in GitHub when requesting this information via accounts.lookup in ProvidedUserInfo as described in https://cloud.google.com/identity-platform/docs/reference/rest/v1/ProviderUserInfo

Relevant Code:

Missing ScreenName field from auth.UserInfo struct to parse it into memory.

--- a/auth/user_mgt.go
+++ b/auth/user_mgt.go
@@ -59,6 +59,9 @@ type UserInfo struct {
        // In UserRecord.UserInfo it will return the constant string "firebase".
        ProviderID string `json:"providerId,omitempty"`
        UID        string `json:"rawId,omitempty"`
+       // ScreenName is the user's screen name at Twitter or login name at GitHub.
+       // Only populated in ProviderUserInfo[]
+       ScreenName string `json:"screenName,omitempty"`
 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants