Skip to content

FR: Parse screenName from ProvidedUserInfo #610

Open
@sixstone-qq

Description

@sixstone-qq

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"`
 }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions