Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User = "" auth error after migrating to 0.3.0 #17

Closed
sbesnard opened this issue Jun 23, 2021 · 1 comment
Closed

User = "" auth error after migrating to 0.3.0 #17

sbesnard opened this issue Jun 23, 2021 · 1 comment

Comments

@sbesnard
Copy link

Hi,

migrating from 2.0 to 3.0, I am unable to log with user/password.

flutter snippet :

var natsClient = Nats.Client();
var connectOptions = Nats.ConnectOption(
            user: natsUser,
            name: natsUser,
            pass: natsPassword,
            tlsRequired: false,
          );
          Uri uri = Uri.parse("ws://$natsURL:4222");
          natsClient.connect(uri, connectOption: connectOptions, retryInterval: 5, timeout: 10, retry: true);

Where natsUser is actually equal to "user".

leads to failure to connect. On the server side :

[9] 2021/06/23 11:24:17.737836 [DBG] 10.2.1.90:36448 - cid:616 - Client connection created
[9] 2021/06/23 11:24:17.905280 [ERR] 10.2.1.90:36448 - cid:616 - authentication error - User ""
[9] 2021/06/23 11:24:17.905745 [TRC] 10.2.1.90:36448 - cid:616 - ->> [-ERR Authorization Violation]
[9] 2021/06/23 11:24:17.905969 [DBG] 10.2.1.90:36448 - cid:616 - Client connection closed: Authentication Failure

With 2.0, I could log in without problem.

Thank you !

@chartchuo
Copy link
Owner

sory for late reply. I not visit this repo for long time.
I just upgrade to 0.4 and now support both tcp socket and websocket in same api just change from "ws://$natsURL:4222" to "nats://$natsURL:4222".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants