File tree Expand file tree Collapse file tree 4 files changed +26
-0
lines changed Expand file tree Collapse file tree 4 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,9 @@ type UserInfo struct {
5959 // In UserRecord.UserInfo it will return the constant string "firebase".
6060 ProviderID string `json:"providerId,omitempty"`
6161 UID string `json:"rawId,omitempty"`
62+ // ScreenName is the user's screen name at Twitter or login name at GitHub.
63+ // Only populated in ProviderUserInfo[]
64+ ScreenName string `json:"screenName,omitempty"`
6265}
6366
6467// multiFactorInfoResponse describes the `mfaInfo` of the user record API response
Original file line number Diff line number Diff line change @@ -57,6 +57,10 @@ var testUser = &UserRecord{
5757 ProviderID : "phone" ,
5858 PhoneNumber : "+1234567890" ,
5959 UID : "testuid" ,
60+ }, {
61+ ProviderID : "github" ,
62+ ScreenName : "login" ,
63+ UID : "testuid" ,
6064 },
6165 },
6266 TokensValidAfterMillis : 1494364393000 ,
@@ -1926,6 +1930,10 @@ func TestMakeExportedUser(t *testing.T) {
19261930 ProviderID : "phone" ,
19271931 PhoneNumber : "+1234567890" ,
19281932 UID : "testuid" ,
1933+ }, {
1934+ ProviderID : "github" ,
1935+ ScreenName : "login" ,
1936+ UID : "testuid" ,
19291937 }},
19301938 MFAInfo : []* multiFactorInfoResponse {
19311939 {
Original file line number Diff line number Diff line change 2020 "providerId" : " phone" ,
2121 "phoneNumber" : " +1234567890" ,
2222 "rawId" : " testuid"
23+ },
24+ {
25+ "providerId" : " github" ,
26+ "screenName" : " login" ,
27+ "rawId" : " testuid"
2328 }
2429 ],
2530 "photoUrl" : " http://www.example.com/testuser/photo.png" ,
Original file line number Diff line number Diff line change 2020 "providerId" : " phone" ,
2121 "phoneNumber" : " +1234567890" ,
2222 "rawId" : " testuid"
23+ },
24+ {
25+ "providerId" : " github" ,
26+ "screenName" : " login" ,
27+ "rawId" : " testuid"
2328 }
2429 ],
2530 "photoUrl" : " http://www.example.com/testuser/photo.png" ,
6671 "providerId" : " phone" ,
6772 "phoneNumber" : " +1234567890" ,
6873 "rawId" : " testuid"
74+ },
75+ {
76+ "providerId" : " github" ,
77+ "screenName" : " login" ,
78+ "rawId" : " testuid"
6979 }
7080 ],
7181 "photoUrl" : " http://www.example.com/testuser/photo.png" ,
You can’t perform that action at this time.
0 commit comments