Skip to content

Flutter-web equivalent of ChannelCredentials allowBadCertificates? #266

@TannerYoung

Description

@TannerYoung

Description

I want to test against a local grpc server with flutter web, but I keep getting net::ERR_CERT_AUTHORITY_INVALID. Is there a way to trust invalid certificates like I can with ClientChannel?

Grpc Version

grpc: ^2.1.3

Current Code

  static final String _serviceAddress = 'grpc.localhost';
  static final int _servicePort = 8090;

  static final GrpcWebClientChannel _grpcChannel = GrpcWebClientChannel.xhr(
    Uri(scheme: "https", host: _serviceAddress, port: _servicePort),
  );

  static final _client = new AccountServiceClient(_grpcChannel,
      options: CallOptions(timeout: Duration(seconds: 30)));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions