File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,14 @@ export interface OAuthResult {
13
13
avatarUrl : string ;
14
14
websiteUrl ?: string ;
15
15
isPro : boolean ;
16
+ canPay ?: boolean ;
16
17
orgs : Array < {
18
+ id : string ;
17
19
name : string ;
18
20
isEnterprise : boolean ;
21
+ canPay ?: boolean ;
22
+ avatarUrl : string ;
23
+ roleInOrg ?: string ;
19
24
} > ;
20
25
} ;
21
26
/**
@@ -151,9 +156,14 @@ export async function oauthHandleRedirect(opts?: { hubUrl?: string }): Promise<O
151
156
picture : string ;
152
157
website ?: string ;
153
158
isPro : boolean ;
159
+ canPay ?: boolean ;
154
160
orgs ?: Array < {
161
+ sub : string ;
155
162
name : string ;
163
+ picture : string ;
156
164
isEnterprise : boolean ;
165
+ canPay ?: boolean ;
166
+ roleInOrg ?: string ;
157
167
} > ;
158
168
} = await userInfoRes . json ( ) ;
159
169
@@ -169,7 +179,16 @@ export async function oauthHandleRedirect(opts?: { hubUrl?: string }): Promise<O
169
179
avatarUrl : userInfo . picture ,
170
180
websiteUrl : userInfo . website ,
171
181
isPro : userInfo . isPro ,
172
- orgs : userInfo . orgs || [ ] ,
182
+ orgs :
183
+ userInfo . orgs ?. map ( ( org ) => ( {
184
+ id : org . sub ,
185
+ name : org . name ,
186
+ fullname : org . name ,
187
+ isEnterprise : org . isEnterprise ,
188
+ canPay : org . canPay ,
189
+ avatarUrl : org . picture ,
190
+ roleInOrg : org . roleInOrg ,
191
+ } ) ) ?? [ ] ,
173
192
} ,
174
193
state : parsedState . state ,
175
194
scope : token . scope ,
You can’t perform that action at this time.
0 commit comments