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
113113 if ( ! request . authProviderId ) {
114114 throw new ConnectError ( "authProviderId is required" , Code . InvalidArgument ) ;
115115 }
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 ) {
119119 throw new ConnectError ( "clientId or clientSecret are required" , Code . InvalidArgument ) ;
120120 }
121121
Original file line number Diff line number Diff line change @@ -227,9 +227,11 @@ export class AuthProviderService {
227227 if ( ! existing ) {
228228 throw new ApplicationError ( ErrorCodes . NOT_FOUND , "Provider resource not found." ) ;
229229 }
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 ;
233235
234236 if ( ! changed ) {
235237 return existing ;
You can’t perform that action at this time.
0 commit comments