File tree 4 files changed +26
-0
lines changed
4 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,9 @@ type UserInfo struct {
59
59
// In UserRecord.UserInfo it will return the constant string "firebase".
60
60
ProviderID string `json:"providerId,omitempty"`
61
61
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"`
62
65
}
63
66
64
67
// 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{
57
57
ProviderID : "phone" ,
58
58
PhoneNumber : "+1234567890" ,
59
59
UID : "testuid" ,
60
+ }, {
61
+ ProviderID : "github" ,
62
+ ScreenName : "login" ,
63
+ UID : "testuid" ,
60
64
},
61
65
},
62
66
TokensValidAfterMillis : 1494364393000 ,
@@ -1926,6 +1930,10 @@ func TestMakeExportedUser(t *testing.T) {
1926
1930
ProviderID : "phone" ,
1927
1931
PhoneNumber : "+1234567890" ,
1928
1932
UID : "testuid" ,
1933
+ }, {
1934
+ ProviderID : "github" ,
1935
+ ScreenName : "login" ,
1936
+ UID : "testuid" ,
1929
1937
}},
1930
1938
MFAInfo : []* multiFactorInfoResponse {
1931
1939
{
Original file line number Diff line number Diff line change 20
20
"providerId" : " phone" ,
21
21
"phoneNumber" : " +1234567890" ,
22
22
"rawId" : " testuid"
23
+ },
24
+ {
25
+ "providerId" : " github" ,
26
+ "screenName" : " login" ,
27
+ "rawId" : " testuid"
23
28
}
24
29
],
25
30
"photoUrl" : " http://www.example.com/testuser/photo.png" ,
Original file line number Diff line number Diff line change 20
20
"providerId" : " phone" ,
21
21
"phoneNumber" : " +1234567890" ,
22
22
"rawId" : " testuid"
23
+ },
24
+ {
25
+ "providerId" : " github" ,
26
+ "screenName" : " login" ,
27
+ "rawId" : " testuid"
23
28
}
24
29
],
25
30
"photoUrl" : " http://www.example.com/testuser/photo.png" ,
66
71
"providerId" : " phone" ,
67
72
"phoneNumber" : " +1234567890" ,
68
73
"rawId" : " testuid"
74
+ },
75
+ {
76
+ "providerId" : " github" ,
77
+ "screenName" : " login" ,
78
+ "rawId" : " testuid"
69
79
}
70
80
],
71
81
"photoUrl" : " http://www.example.com/testuser/photo.png" ,
You can’t perform that action at this time.
0 commit comments