Authentication issue with WebSocket using SyncGateway Public REST API 2.8

I was trying to create a WebSocket using the public SGW REST API call, “/{db}/_changes/”, on our Flutter Web app.
But it is not possible to set the required authentication SyncGatewaySession cookie using the Dart WebSocket API on Flutter. The WebSocket API on Flutter/dart does not allow setting cookie and headers (on web applications).

Are there any other ways to authenticate this call except using Basic Authentication and Cookie?
Please elaborate on how to create a WebSocket using this REST API call.

By the way, I am not sure if it’s possible to set a cookie header in WebSocket API using JavaScript either. It’s probably because of some known security issue.

Any help would be highly appreciated.
Thanks in advance

Interesting that learn that Dart/Flutter APIs do not allow for auth headers (you are right that vanilla JS clients have similar issues)
Can you use using HTTP continuous instead.

CC @bbrks for any insights