File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -113,9 +113,9 @@ export class JsonRpcAuthProviderClient implements PromiseClient<typeof AuthProvi
113
113
if ( ! request . authProviderId ) {
114
114
throw new ConnectError ( "authProviderId is required" , Code . InvalidArgument ) ;
115
115
}
116
- const clientId = request ?. clientId ;
117
- const clientSecret = request ?. clientSecret ;
118
- if ( ! clientId || ! clientSecret ) {
116
+ const clientId = request ?. clientId || "" ;
117
+ const clientSecret = request ?. clientSecret || "" ;
118
+ if ( ! clientId && ! clientSecret ) {
119
119
throw new ConnectError ( "clientId or clientSecret are required" , Code . InvalidArgument ) ;
120
120
}
121
121
Original file line number Diff line number Diff line change @@ -227,9 +227,11 @@ export class AuthProviderService {
227
227
if ( ! existing ) {
228
228
throw new ApplicationError ( ErrorCodes . NOT_FOUND , "Provider resource not found." ) ;
229
229
}
230
- const changed =
231
- entry . clientId !== existing . oauth . clientId ||
232
- ( entry . clientSecret && entry . clientSecret !== existing . oauth . clientSecret ) ;
230
+
231
+ // Explicitly check if any update needs to be performed
232
+ const changedId = entry . clientId && entry . clientId !== existing . oauth . clientId ;
233
+ const changedSecret = entry . clientSecret && entry . clientSecret !== existing . oauth . clientSecret ;
234
+ const changed = changedId || changedSecret ;
233
235
234
236
if ( ! changed ) {
235
237
return existing ;
You can’t perform that action at this time.
0 commit comments