File tree Expand file tree Collapse file tree
packages/durabletask-js-azuremanaged/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -157,14 +157,16 @@ abstract class DurableTaskAzureManagedOptionsBase {
157157 * @param workerId Optional worker ID (only for workers).
158158 */
159159 protected createChannelCredentialsInternal ( callerType : string , workerId ?: string ) : grpc . ChannelCredentials {
160+ const metadataGenerator = this . createMetadataGeneratorInternal ( callerType , workerId ) ;
161+ const callCredentials = grpc . credentials . createFromMetadataGenerator ( metadataGenerator ) ;
162+
160163 if ( this . _allowInsecureCredentials ) {
161- return grpc . ChannelCredentials . createInsecure ( ) ;
164+ // For insecure connections (e.g., emulator), we still need to add metadata
165+ const insecureCredentials = grpc . ChannelCredentials . createInsecure ( ) ;
166+ return insecureCredentials . compose ( callCredentials ) ;
162167 }
163168
164169 const channelCredentials = grpc . ChannelCredentials . createSsl ( ) ;
165- const metadataGenerator = this . createMetadataGeneratorInternal ( callerType , workerId ) ;
166- const callCredentials = grpc . credentials . createFromMetadataGenerator ( metadataGenerator ) ;
167-
168170 return channelCredentials . compose ( callCredentials ) ;
169171 }
170172
You can’t perform that action at this time.
0 commit comments